Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AlertDialog Customize 5
AlertDialog dialog = new AlertDialog.Builder(this)
.setCustomTitle(titleView)
.setView(msgView)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// OK が押された時の処理を書く
}
})
.show();
// ボタン
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(Color.WHITE);
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setBackgroundColor(getResources().getColor(R.color.alertBlue));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.