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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:35:46+00:00 2026-06-09T16:35:46+00:00

Friends, I am using an alertbox in my app. public static void Alertbox(String title,

  • 0

Friends, I am using an alertbox in my app.

public static void Alertbox(String title, String mymessage,Context context) {
        new AlertDialog.Builder(context)
        .setMessage(mymessage)

        .setCancelable(true)
        .setNeutralButton(android.R.string.ok,new DialogInterface.OnClickListener()

        {
            public void onClick(DialogInterface dialog,int whichButton) {

            }
        }).show();
    }

    public static void ProcessDialogue(String title,Context context)
    {


    }

I am successfully implementing this code, but the issue is I am using it in following manner

Response.Alertbox(" ", "Thank You",this);
        Intent intent=new Intent(this,Tabs.class);
        startActivity(intent);

The problem is the alertbox is shown for a very small duration.. many-a-times it happens that the Tabs activity is called & the alertbox message cannot be read also. Please help me with a way such that till Ok on alertbox is not pressed it must not navigate to the next activity.

  • 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-09T16:35:47+00:00Added an answer on June 9, 2026 at 4:35 pm

    If you want to navigate away on the click of the button, then put the navigation code in the onclick event. You may also want to close the dialogue when the button is pressed.

    public static void Alertbox(String title, String mymessage,Context context) {
        new AlertDialog.Builder(context)
        .setMessage(mymessage)
    
        .setCancelable(true)
        .setNeutralButton(android.R.string.ok,new DialogInterface.OnClickListener()
    
        {
            public void onClick(DialogInterface dialog,int whichButton) {
                Intent intent=new Intent(MyActvity.this,Tabs.class);
                startActivity(intent);
                dismissDialog();
            }
        }).show();
    }
    
    public static void ProcessDialogue(String title,Context context)
    {
    
    
    }
    

    And simply call the dialogue with

    Response.Alertbox(" ", "Thank You",this);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Friends i'm using string builder for generating Passenger List in which i have used
The following batch request for retrieve friends using the same app is not working:
My app is using Google's C2DM (push notification) to notify users about new activity
I am trying to get Online Friends by using following code. protected void GetActiveFriends()
I am using below code to get profile image of friends using Resfb. I
I can send requests to friends using Multi Friend Request Selector inside my Page
I'm trying to get a list of user's friends using fb connect for the
Follow up to this question for Facebook Friends.getAppUsers using Graph API that pulls friends
Hi friends i'm getting json from server (using kohana framework 3.0) like this.... {
Friends, I like to know using which version of Android SDK we can develop

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.