
如何更改AlertDialog中的textcolor?
<item name="android:textColor">@color/black_text</item>
Run Code Online (Sandbox Code Playgroud)
这仅更改标题颜色.
ad = new AlertDialog.Builder((new ContextThemeWrapper(context, R.style.DialogTheme)));
ad.setTitle(R.string.my_activ_remove_title_dialog);
ad.setPositiveButton(R.string.my_activ_remove_dialog, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int arg1) {
content.remove(position);
notifyItemRemoved(position);
notifyItemRangeChanged(position, content.size());
}
});
ad.setNegativeButton(R.string.my_activ_cancel_remove_dialog, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int arg1) {
}
});
Run Code Online (Sandbox Code Playgroud)
android ×1