close





public AlertDialog myAlertDialog;

public void showDialog(Context context) {
if( myAlertDialog != null && myAlertDialog.isShowing() ) return;

AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle("Title");
builder.setMessage("Message");
builder.setPositiveButton("ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int arg1) {
dialog.dismiss();
}});
builder.setCancelable(false);
myAlertDialog = builder.create();
myAlertDialog.show();
}




arrow
arrow
    全站熱搜
    創作者介紹
    創作者 小彬彬 的頭像
    小彬彬

    攝即是空

    小彬彬 發表在 痞客邦 留言(0) 人氣()