My question is very simple, but I can not understand:
When I try to display the subtitle , the toolbar is not enough space to display it, and cut it.
Toolbar:
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="?android:actionBarSize"
android:layout_centerHorizontal="true"
app:theme="@style/MyToolBar">
Are ?android:actionBarSizethere really not enough heights for the title and subtitles to display correctly ?
When I set ToolBar height to wrap_content, everything works, but can someone explain to me how I should set the height correctly?
styles.xml:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowBackground">@color/background1</item>
<item name="android:textColorPrimary">@color/colorAccent</item>
</style>
<style name="MyToolBar" parent="Widget.AppCompat.ActionBar">
<item name="android:textColorPrimary">@color/colorAccent</item>
<item name="android:textColorSecondary">@color/colorAccent</item>
<item name="colorControlNormal">@color/colorAccent</item>
</style>
source
share