AlertDialog.Builder 样式设置
2015-04-20 15:05
316 查看
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this, R.style.AlertDialogCustom));
然后自定义自己的样式就可以了
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AlertDialogCustom" parent="@android:style/AlertDialog">
<item name="android:textColor">#00FF00</item>
<item name="android:typeface">monospace</item>
<item name="android:textSize">10sp</item>
</style>
</resources>
然后自定义自己的样式就可以了
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AlertDialogCustom" parent="@android:style/AlertDialog">
<item name="android:textColor">#00FF00</item>
<item name="android:typeface">monospace</item>
<item name="android:textSize">10sp</item>
</style>
</resources>
相关文章推荐
- 【转】bootbox自定义dialog、confirm、alert样式,以及基本设置方法setDefaults中可用参数
- bootbox自定义dialog、confirm、alert样式,以及基本设置方法setDefaults中可用参数
- Builder模式设置AlertDialog字体大小、颜色等属性
- android 设置AlertDialog样式,宽度为屏幕宽度
- AlertDialog中的样式设置
- bootbox自定义dialog、confirm、alert样式,以及基本设置方法setDefaults中可用参数
- Builder模式设置AlertDialog字体大小、颜色等属性
- Android之点击对话框(AlertDialog.Builder)外部区域不关闭对话框的设置
- Android AlertDialog.Builder进入和退出动画效果设置
- android AlertDialog.Builder 设置对话框不消失
- bootbox自定义dialog、confirm、alert样式,以及基本设置方法setDefaults中可用参数
- bootbox自定义dialog、confirm、alert样式,以及基本设置方法setDefaults中可用参数
- android AlertBuilder创建的dialog,使用自定义样式
- Builder模式设置AlertDialog字体大小、颜色等属性
- 自定义AlertDialog button的样式
- the constructor AlertDialog.Builder(new View.OnClickListener() ) is undefined
- 给DialogFragment设置样式
- 自定义AlertDialog.Builder对话框
- MaterialDialog 仿Android 5.0原生的AlertDialog样式的对话框
- The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder is not applicable for the arguments