Search This Blog

Thursday, September 8, 2016

Dialog - Hàm show dialog

public static void ShowMsgBox(Context context, String msg) {

AlertDialog.Builder ab = new AlertDialog.Builder(context);
ab.setTitle(R.string.lblNotice);
ab.setMessage(msg);
ab.setPositiveButton(R.string.lblClose, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {                        
dialog.dismiss();
}
});
ab.show();
}

No comments:

Post a Comment