Alert Box in Android doesn't let me to click, just directly performs the action
问题 I've a button upon clicking should display an alertdialog box containing just "OK" button and upon clicking should go to another activity. But this dialog box appears for a few seconds and goes to the activity without letting me click or confirm it. This is the code i've used public void onClick(View v) { AlertDialog.Builder alertbox = new AlertDialog.Builder(InsertData.this); alertbox.setMessage("Object Location Stored!"); alertbox.setPositiveButton("Ok", new DialogInterface.OnClickListener(