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

  • Home
  • SEARCH
  • 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 7777691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:12:28+00:00 2026-06-01T18:12:28+00:00

Am doing my android project. I have created the dialog box with YES and

  • 0

Am doing my android project. I have created the dialog box with YES and NO button. If i click YES a new dialog box should be displayed with options to select. I created the dialog box with options. But couldnt display it when i click YES in the dialog box which i created first. How can i do it? Please help.
Thanks.

Here is the code of the dialog box which i created. When i click YES button in this dialog i should display another dialog

AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Low Memory\nYou want to send the file to server?")
               .setCancelable(false)
               .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
                   public void onClick(DialogInterface dialog, int id) {

                   }
               })
               .setNegativeButton("No", new DialogInterface.OnClickListener() {
                   public void onClick(DialogInterface dialog, int id) {
                        dialog.cancel();
                        finish();
                   }
               });
AlertDialog alert = builder.create();
alert.show();
  • 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-01T18:12:29+00:00Added an answer on June 1, 2026 at 6:12 pm
    AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setMessage("Low Memory\nYou want to send the file to server?")
                .setCancelable(false)
                .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
    
                        AlertDialog.Builder builder2 = new AlertDialog.Builder(CLASSNAME.this);
                        builder2.setTitle("hi!");
                        //etc
                        builder2.show();
    
                    }
                })
                .setNegativeButton("No", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                         dialog.cancel();
                         finish();
                    }
                });
         AlertDialog alert = builder.create();
         alert.show();
    

    Hope this helps. 😉

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

Sidebar

Related Questions

I am doing NDK profiling for my project using android-ndk-profiler-3.1. I have made changes
I'm doing a Get and Post method for an android project and I need
I am doing a streamed musicplayer for android. I have tried with MediaPlayer mp.setDataSource(http://www.myServerPage.com/songUrl.mp3);
I am doing Android programing with Eclipse (Helios), and I have some utility classes
i have try to create new ndk project in eclipse i have done all
I am new to android coding and was making a project with ListView. I
I have an Android project that depends on a non-Android JAR that contains resources
i have made the following animation xml file in my android project: <?xml version=1.0
I am working on my first android project. i am doing a maos based
I need some help with properly versioning my Android project with Git/Eclipse. I have

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.