AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this, R.style.AlertDialogCustom));
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>