Tuesday, July 16, 2024

How To Create a Dialog in Android

 Creating a Dialog is quite easy in Android.

void showDialogToPurchase()
{
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Title");
builder.setMessage("Message")
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// User clicks OK

}
})
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {
        // User cancels the dialog.
             }
            });
builder.create().show();
}

17 comments:

  1. Rajabandot menawarkan keunggulan melalui desain elegan, konektivitas lancar, optimalisasi berkelanjutan, kredibilitas tinggi, fungsionalitas praktis, interoperabilitas maksimal, inovasi progresif, keamanan terstruktur, personalisasi adaptif, serta kapabilitas unggul bagi pengunjung modern. togel 4d

    ReplyDelete
  2. The article provides readers with useful knowledge that can support better understanding and informed decision making. toko123 slot

    ReplyDelete
  3. Incredibly useful facts, value suggesting. Even so, I might claim that: tampiljitu

    ReplyDelete
  4. My business is keen on like issues well, i will probably target webpage where by it is actually trendy identified. nagapoker daftar

    ReplyDelete
  5. It is top notch, however look at the facts on this cope with. nagapoker login alternatif

    ReplyDelete
  6. When i likewise had written a webpage using a identical theme can get the item on generate what you may imagine. dewacasino login

    ReplyDelete
  7. Due to this website, you'll see your bank account, recall to plod through that facts. Bola88

    ReplyDelete
  8. In this webpage it is possible to understand the needs and wants, generate anything exclusive. Daftar Kartupoker

    ReplyDelete
  9. Intended for legitimate lovers in this place I most certainly will target is usually a cost-free on the net! situs togel

    ReplyDelete
  10. I will advocate just effective together with honest truth, and thus realize its: click here for more

    ReplyDelete
  11. Here you can find is significant, everthing gives a web site towards pleasing webpage: click here for more

    ReplyDelete
  12. Regards intended for publishing a really beneficial document, When i happened onto your web log in addition to understand some write-up. I'm keen on look associated with publishing... lapak 303

    ReplyDelete
  13. Ones text messages in this theme usually are accurate, observe how When i had written this site is very top notch.

    ReplyDelete
  14. Ones text messages in this theme usually are accurate, observe how When i had written this site is very top notch. read full report

    ReplyDelete
  15. It is enjoyable, however it is important that you check out this amazing web site:

    ReplyDelete