0
我有一個要求,例如學生姓名將從數據庫中取出並顯示在警告框中。一個複選框,應在警報顯示每個學生的名字,以便用戶可以選擇從警報box.I學生的名字都與學生做names.Can任何人給一個想法,以顯示覆選框每個學生在警報中添加動態數量的複選框
public void Show_friends()
{
AlertDialog.Builder builder1 = new AlertDialog.Builder(this);
try
{
builder1.setItems(paymentby,new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int item)
{
}
}
);
AlertDialog alert = builder1.create();
alert.show();
}
catch (Exception e) {
System.out.println("Gesture exception caught");
}
System.out.println("================vij=========================inside if");
}
}
這是我的代碼
看到這個鏈接,它可以幫助你.. http://stackoverflow.com/a/10933605/1168654 http://stackoverflow.com/a/10652886/1168654 –