Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8868427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:16:08+00:00 2026-06-14T17:16:08+00:00

I am trying to make a custom dialog with listview which is going to

  • 0

I am trying to make a custom dialog with listview which is going to contain checkboxes and textviews and i just couldnt find a reasonable tutorial to do it , any help or hints would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:16:09+00:00Added an answer on June 14, 2026 at 5:16 pm
    private void showPopUp()
    {
        final AlertDialog.Builder helpBuilder = new AlertDialog.Builder(this);
        helpBuilder.setTitle("");
    
        LayoutInflater inflater = getLayoutInflater();
        final View PopupLayout = inflater.inflate(R.layout.yourxml, null);
        helpBuilder.setView(PopupLayout);
    
        final AlertDialog helpDialog = helpBuilder.create();
        helpDialog.show();
    
        jobList         =   (ListView)PopupLayout.findViewById(R.id.list);
    
        mylist          =   new ArrayList<HashMap<String, String>>();
    
        for(int i=0;i<arraylist.size();i++)
        {
            map = new HashMap<String, String>();
            map.put("name", arraylist.get(i));
            mylist.add(map);
        }
        sd = new SimpleAdapter(activity.this,mylist,R.layout.jobslist,
                    new String[]{"name"},new int[]{R.id.jobText});
        jobList.setAdapter(sd);
    
    
    }
    

    joblist.xml

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/lin01"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="#fff"
    android:padding="10dp"
    android:orientation="horizontal">
    
            <TextView
                android:id="@+id/jobText"
                android:layout_width="0dp"
                android:text="@string/jobtype"
                android:layout_weight="1"
                android:gravity="left|center_vertical"
                android:layout_marginLeft="10dp"
                android:textSize="25dp"
                android:textColor="#000"
                android:layout_height="50dp"/>
    
            <CheckBox 
                android:id="@+id/chk"
                android:layout_width="wrap_content"
                android:text=""
                android:gravity="center_vertical|right"
                android:layout_height="wrap_content"/>
    
    
            </LinearLayout>
    

    you can call this showPopUp(); function wherever you want to display the alert dialog with listview. please note that there will be the arraylist which you can add items to it to show the items in a list

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make a custom dialog in Android. Everything works perfectly except
I am trying to make Custom RelativeLayout which can scale and scroll. Right now
I'm trying to make a custom tabgroup in appcelerator in which one (or two)
I am trying to make a custom Flex tooltip a la this tutorial .
I'm trying to make a custom dialog to show a view in this dialog.
I am trying to make a custom dialog with a set of check boxes,
Im trying to make custom icons for my HTC EVO, which is running Cyanogen
I'm trying to make custom control (like UIButton) manually which can recognize user's touch.
I am trying to make a custom dialog box LayoutInflater li = LayoutInflater.from(this); View
I'm trying to make sort of a custom dialogue, which would have a previous

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.