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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:39:55+00:00 2026-05-30T16:39:55+00:00

I am building an alert dialog with a checkbox. Whenever I set the message

  • 0

I am building an alert dialog with a checkbox. Whenever I set the message to anything (even a short message like “my msg”) the dialog only shows the title, and the cancel button. The middle body of the dialog is a blank white. Nothing is shown. The code is below. Any idea on why the dialog shows blank whitespace? Why won’t it display my message?

     @Override
 protected Dialog onCreateDialog(int id){

     switch(id){
     case MY_DIALOG:
         return new AlertDialog.Builder(this)
         .setIcon(R.drawable.identification_icon)
         .setTitle("My Title")
         .setMessage("short msg")
         .setPositiveButton("OK", new DialogInterface.OnClickListener() {

            @Override
            public void onClick(DialogInterface dialog, int which) {
                // TODO Auto-generated method stub

            }
        })
        .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {

            @Override
            public void onClick(DialogInterface dialog, int which) {
                // TODO Auto-generated method stub

            }
        })
        .setMultiChoiceItems(ackOptions, ackOptChecked, new DialogInterface.OnMultiChoiceClickListener() {

            @Override
            public void onClick(DialogInterface dialog, int which, boolean isChecked) {
                // TODO Auto-generated method stub

            }
        }).create();
     }

     return null;
 }
  • 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-30T16:39:56+00:00Added an answer on May 30, 2026 at 4:39 pm

    You need to inflate your alert dialog box to make the required changes like adding your own checkbox .
    1. define the xml you want for your alert dialog box to show
    2. inflate the alert dialog box and use your defined xml

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

Sidebar

Related Questions

I'm building an AlertDialog that contains a custom View like so: @Override protected Dialog
Building a client-side swing application what should be notified on a bus (application-wide message
I'm building a CakePHP website that sends an e-mail like this: $email = new
I am building a custom ProgressDialog and would like for the background Activity to
We are building an email alert system which needs to send customized emails in
I am building an alert box which has a char array of elements which
I'm getting a JSON element and building a list from its items like this:
I have a site that I'm building a mobile version for. I would like
Building on How Do You Express Binary Literals in Python , I was thinking
Building the same project (without any changes) produces binary different exe-files: some small regions

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.