Positive Button
This is for a slider puzzle. I want to show a dialog box with OK button when the puzzle is completed. When the OK button is pressed, I use an Intent to load a website via Android browser. Only problem is that with the current code, when the puzzle is complete, it does not load a box (it does when I use null).
AlertDialogue.Builder b=new Builder(this);
b.setTitle(“sample”);
b.setpositive Button(“OK”,new OnclickListener())
{
onClick(){
}
}
AlertDialog d=b. Create();
d.show();
on PreExecute(){
ProgressDialog.setMessage(“Loading”);
dialog.show();
}
Class MainActivity {
ProgressDialog d;
onCreate()}
class MyTask {
onPreExecute()
{d =new ProgressDialog(MainActivity.this);
d.setMessage(‘Logging In’);
d.show
}
doInBackground()
}
on PostExecute(){
d.dissmiss();
}
Comments
Post a Comment