【发布时间】:2015-07-06 20:44:00
【问题描述】:
我在单击按钮时显示一个 AlertDialog,该按钮将具有正面和负面按钮,它们是带有消息的 AlertDialog 的默认按钮。
我想更改这些按钮和消息的字体系列,我该如何更改?
下面是我的代码:
AlertDialog.Builder altDialog = new AlertDialog.Builder(context);
altDialog.setMessage(Constants.WARNING_STEPS);
altDialog.setTitle(Constants.WARNING);
altDialog.setCancelable(true);
altDialog.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
});
altDialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
altDialog.show();
【问题讨论】:
-
在对话框中使用自定义布局检查此链接stackoverflow.com/questions/10538482/…
-
你找到解决办法了吗?
标签: android android-alertdialog android-fonts