public void downloadSeat(View view) { AlertDialog.Builder builder = new AlertDialog.Builder(WrongSearch.this); builder.setTitle(Html.fromHtml("<font color='#FF7F27'>Download Seat Plan</font>")); builder.setMessage("Are you Download Seat Plan? "); builder.setIcon(R.drawable.just); builder.setPositiveButton("YES", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { downloadSeat(); } }); builder.setNegativeButton("View", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Toast.makeText(getApplicationContext(),"No click",Toast.LENGTH_LONG).show(); } }); builder.setNeutralButton("CANCEL", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { } }); AlertDialog alert = builder.create(); alert.show(); }
Saturday, September 30, 2017
Alert Dialog - Three option in android Yes no cancel
Labels:
AleartDialog,
android