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 7650799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:20:42+00:00 2026-05-31T11:20:42+00:00

I have an android app with a button. When clicking the button I need

  • 0

I have an android app with a button. When clicking the button I need on the screen a dialob box with multiple check boxes annd an ok button. How to do that? Do i need an xml layout for the list with checkboxes?

1. How to add to each element in the list dialog box a check box?

2. How to put in a string all the checked elements when the button OK is pressed.

this is my code so far:

 app_part.setOnClickListener(new OnClickListener() {

            public void onClick(View v) {


                final String items[] = {"1","2","3","4"};

                AlertDialog.Builder ab=new AlertDialog.Builder(ConferenceClass.this);
                ab.setTitle("SIP CONTACTS");
                ab.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface d, int choice) {
                    // on OK button action
                    }
                    });
                ab.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface d, int choice) {
                    // on Cancel button action
                    }
                    });
                ab.setItems(items, new DialogInterface.OnClickListener() {


                public void onClick(DialogInterface d, int choice) {


                }
                });
                ab.show();
                 //open contact list and select persons


                }
        });
  • 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-05-31T11:20:43+00:00Added an answer on May 31, 2026 at 11:20 am

    Yes u can just create the layout like you would normally do, when u design a activity layout. THe only different is that you have to set in your manifest that its a dialog.

    android:theme=”@android:style/Theme.Dialog”

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

Sidebar

Related Questions

I have a class that extends android.app.Dialog, the layout is done in an xml
I'm defining a style XML for my android app. I have some TTF files
I have an Android project that branched into three different applications, app-1 , app-2
I have an Android app that uses ActionBar Sherlock. I create a menu that
I have developed an android app that mainly targets smartphones. However in tablet emulator
I have created a simple app for android, that uses buttons to navigate different
I am writing a simple android app which have a edittext and a button.
I have an android app that extends a MapActivity, so I can't extend TabActivity.
I have popup in my android app. In popup I have button for closing
I have an Android app that is localized for English and Spanish. When you

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.