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.
If you want to navigate away on the click of the button, then put the navigation code in the
onclickevent. You may also want to close the dialogue when the button is pressed.And simply call the dialogue with