SORU
27 NİSAN 2011, ÇARŞAMBA


Android AlertDialog Tek Düğme

Sadece TAMAM ya Bitti diyor bir düğme ya da bir şey, varsayılan yerine bu AlertDialog bir inşaatçı evet ve hayır yapmak istiyorum. Standart AlertDialog ile yapılabilir, veya başka bir şey kullanmak zorunda mıyım?

CEVAP
27 NİSAN 2011, ÇARŞAMBA


Bu sadece olumlu bir düğmesini kullanarak yapılamaz mıydı?

AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Look at this dialog!")
       .setCancelable(false)
       .setPositiveButton("OK", new DialogInterface.OnClickListener() {
           public void onClick(DialogInterface dialog, int id) {
                //do things
           }
       });
AlertDialog alert = builder.create();
alert.show();

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Hudson Music

    Hudson Music

    13 Mart 2007
  • Study with Substance P

    Study with S

    31 Mayıs 2008
  • TechBalance

    TechBalance

    12 HAZİRAN 2011