0

I try to change alertDialog's textSize via theme.xml but I can do it. This is my code from manifest:

<application
    android:allowBackup="true"
    android:icon="@drawable/appicon"
    android:label="@string/app_name"
    android:theme="@style/CustomActionBarTheme">

And my themes.xml:

<style name="CustomActionBarTheme"
       parent="@android:style/Theme.Holo.Light.DarkActionBar">
    <item name="android:actionBarStyle">@style/CustomBar</item>
    <item name="android:actionBarTabTextStyle">@style/Widget.CustomTabText</item> 
    <item name="android:actionMenuTextAppearance">@style/CustomBar.MenuTextStyle</item>    
    <item name="android:alertDialogStyle">@style/CustomDialogTheme</item>   
</style>


<style name="CustomDialogTheme" parent="@android:style/Theme.Dialog">
    <item name="android:bottomBright">@color/white</item>
    <item name="android:bottomDark">@color/white</item>
    <item name="android:bottomMedium">@color/white</item>
    <item name="android:centerBright">@color/white</item>
    <item name="android:centerDark">@color/white</item>
    <item name="android:centerMedium">@color/white</item>
    <item name="android:fullBright">@color/blueDialog</item>
    <item name="android:fullDark">@color/blueDialog</item>
    <item name="android:topBright">@color/blueDialog</item>
    <item name="android:topDark">@color/blueDialog</item>
    <item name="android:textSize">50sp</item>
</style>    

Thanks in advance!!!

Rafael
  • 185
  • 1
  • 4
  • 14
  • Please check http://stackoverflow.com/questions/2422562/how-to-change-theme-for-alertdialog – Pavya Jan 22 '15 at 09:59

1 Answers1

0

I can answer myself:

<application
    android:allowBackup="true"
    android:icon="@drawable/varmasinfondo"
    android:label="@string/app_name"
    android:theme="@style/CustomerAppBaseTheme"
    >

<style name="CustomerAppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">    
    <item name="android:alertDialogTheme">@style/CustomerAlertDialogTheme</item>
    <item name="android:alertDialogStyle">@style/CustomerAlertDialogStyle</item>                
    <item name="android:actionBarStyle">@style/CustomBar</item>
    <item name="android:actionBarTabTextStyle">@style/Widget.CustomTabText</item> 
    <item name="android:actionMenuTextAppearance">@style/CustomBar.MenuTextStyle</item>    
</style>

<style name="CustomerAlertDialogTheme">...
</style>

<style name="CustomerAlertDialogStyle">...
</style>

...

And then you can change the style for ActionBar and Alertdialog.

Rafael
  • 185
  • 1
  • 4
  • 14