我想设置工具栏菜单项的高度。
我对下面的代码:
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:minHeight="?attr/actionBarSize"
android:padding="2dp"
app:popupTheme="@style/MyDarkToolbarStyle"
app:theme="@style/ThemeToolbar"
app:titleMarginStart="20dp" />
Tablayout的代码:
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
style="@style/LightThemeSelector"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabBackground="@color/White"
app:tabGravity="fill"
app:tabIndicatorColor="@color/Black"
app:tabMode="fixed"
app:tabSelectedTextColor="@color/Black"
app:tabTextColor="@color/common_signin_btn_light_text_disabled"></android.support.design.widget.TabLayout>
在Manifest中声明的Style样式:
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">true</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorControlNormal">@color/normalColor</item>
<item name="colorControlActivated">@color/colorPrimary</item>
<item name="colorControlHighlight">@color/colorPrimaryDark</item>
<item name="android:textColor">@color/Black</item>
<item name="android:textColorHighlight">@color/colorPrimaryDark</item>
<item name="android:textColorHint">@color/normalColor</item>
<item name="android:popupMenuStyle">@style/MyActionButtonStyle</item>
<!-- Change Overflow Menu ListView Item Height & Property -->
<item name="android:listPreferredItemHeightSmall">25dp</item>
<item name="android:listPreferredItemPaddingLeft">5dp</item>
<item name="android:listPreferredItemPaddingRight">5dp</item>
</style>
<style name="AppBaseTheme" parent="Theme.AppCompat.NoActionBar">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
我的问题是此代码适用于Lolipop。但是在Lolipop之下这不起作用。请指导我这背后的问题是什么。