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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:35:11+00:00 2026-05-20T04:35:11+00:00

AlertDialog.Builder alt_bld = new AlertDialog.Builder(this); when i wrote this error is shawn that The

  • 0
AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);

when i wrote this error is shawn that

The constructor AlertDialog.Builder(new Runnable(){}) is undefined

.. so just tell me what i m do…

  • 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-20T04:35:11+00:00Added an answer on May 20, 2026 at 4:35 am

    are you trying to run a dialog from Runnable? you cannot pass runnable as the context. you should replace “this” by YourActivityClassName.this in order to pass your activity’s context into constructor.

    if this construction is within a thread, then i guess it’s kinda wrong, cause you shound’t perform any UI operations from different threads. you should use handlers to pass messages to the main activity.. i may be wrong though, cause i don’t see the whole code

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

Sidebar

Related Questions

I got this dialog snipet: String message=This will be my message; AlertDialog.Builder alt_bld =
new AlertDialog.Builder(this) .setMessage(mymessage) .setTitle(title) .setCancelable(true) .setNeutralButton(android.R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int
public class IdAsync extends AsyncTask<String, Void, Void> { AlertDialog alertDialog = new AlertDialog.Builder(MainClass.this).create(); protected
@Override protected Dialog onCreateDialog (int id) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.instant_alert_screen_title); builder.setInverseBackgroundForced(true);
AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(Title); builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog,
@Override protected void onStop() { super.onStop(); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(Test message) .setCancelable(true)
I currently have this: Builder yesandno = new AlertDialog.Builder(this); yesandno.setTitle(QuickResponse); yesandno.setMessage(message); yesandno.setPositiveButton(YES, null); yesandno.setNegativeButton(NO,
I am using this alert dialog: public void displayAlert() { new AlertDialog.Builder(getActivity()).setMessage(R.string.invitenotice) .setTitle(Invite Notice)
Heres my code: AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle(What's Your name?); alert.setMessage(Seems like you're
I have this simple code: AlertDialog dialog = new AlertDialog.Builder(this).create(); dialog.setTitle (Alert title); dialog.setMessage

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.