I have below code to display dialog box. Our requirement is user has too update app before login to the app.
new AlertDialog.Builder(LoginSlider.this)
.setTitle("Update is Available!")
.setMessage("Please update your app to use new features")
.setPositiveButton("Update now", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
final String appPackageName = getPackageName();
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
}
})
.setIcon(android.R.drawable.ic_dialog_alert)
.show();
When I click out side of the dialog box. it gets disappear. I don't want that. How can I do this?