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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:49:45+00:00 2026-05-28T20:49:45+00:00

In my app I have used an alert dialog builder for button click. So

  • 0

In my app I have used an alert dialog builder for button click. So when I press a button, little pop up is opened with options – Activate and Deactivate. So can i make that when a user press Activate or Deactivate, Confirmation widnows open with question are you sure ? and a choice yes or no ??

  • 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-28T20:49:46+00:00Added an answer on May 28, 2026 at 8:49 pm

    I have created dialog inside another dialog.

    See this code:

    twsbiSelectionMenuDialog = new Dialog(this,R.style.CustomDialogTheme);
                twsbiSelectionMenuDialog.setContentView(R.layout.twsbi_selection_menu_dialog);
                twsbiSelectionMenuDialog.setCancelable(true);
                twsbiSelectionMenuDialog.setCanceledOnTouchOutside(true);
                
                // To Open new Canvas ===================================
                Button newLayoutButton = (Button) twsbiSelectionMenuDialog.findViewById(R.id.newLayoutButton);
                newLayoutButton.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        twsbiSelectionMenuDialog.dismiss();
                        // AlertDialog for confirmation
                        AlertDialog.Builder clearConfirmDialog = new AlertDialog.Builder(TWSBIDrawMainActivity.this);
                        clearConfirmDialog.setMessage("Do you want to clear this and open new canvas ?").setCancelable(false)
                        .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int id) {
                                // Action for 'Yes' Button
                                myView = new MyView(TWSBIDrawMainActivity.this);
                                takePhotoFromCamera = false;
                                takePhotoFromGallery = false;
                                canvasColor = 0xFFFFFFFF;
                                drawingLayout.removeView(myView);
                                drawingLayout.addView(myView);
                            }
                        })
                        .setNegativeButton("No", new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int id) {
                                //  Action for 'NO' Button
                                dialog.cancel();
                            }
                        });
                        AlertDialog alert = clearConfirmDialog.create();
                        alert.setTitle("Draw");
                        alert.setIcon(R.drawable.app_icon);
                        alert.show();
                    }
                });
                
                // For canvas Color Selection ===================================
                Button canvasColorButton = (Button) twsbiSelectionMenuDialog.findViewById(R.id.canvasColorButton);
                canvasColorButton.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        twsbiSelectionMenuDialog.dismiss();
                        pickColour(); // to pick colour
                    }
                });
    

    Just refer that for your condition and it will help you.

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

Sidebar

Related Questions

I have used Local Notification in my app an successfully generated an alert at
In my android app I have used InMobi ad sdk to show banner ad's.
I am creating a rails app and have used this code in one of
I want to use mysql with a rails app (I have never used mysql
I have used an app to stream Android Audio with RTMP, the app is
I have created an app in which I have used achartengine to construct the
I have used SQL SERVER 2005 & c# .net for front end & app.config
In my sinatra app i have a form which is used to submit data
In my app I used to have a time picker and a date picker.
I have an app that uses Spring security and BlazeDS. Flex 3.2 is used

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.