After several hours of try I give up... How to set bold font for action bar title? I have values/styles.xml
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light">
<!-- Background color -->
<item name="android:background">#f1a30b</item>
<!-- Menu text -->
<item name="android:textColor">#ffffff</item>
<item name="android:textStyle">bold|italic</item>
<!-- Ttle color -->
<item name="android:textColorPrimary">#ffffff</item>
<item name="android:titleTextStyle">@style/AppTheme.MyActionBar.TitleTextStyle</item>
</style>
<style name="AppTheme.MyActionBar.TitleTextStyle" parent="ThemeOverlay.AppCompat.ActionBar">
<item name="android:background">#81CFEB</item>
<item name="android:textColor">#000000</item>
<item name="android:textStyle">bold</item>
</style>
</resources>
Menu text color, style and background color OK. But how to change font for title (style and text size)? I need bold and 25dp.
I understand that in manifest I should only have line android:theme="@style/AppTheme" for application... nothing more. Should I import some class in activity?
Aucun commentaire:
Enregistrer un commentaire