我在一个菜单项上设置actionLayout和设置背景颜色和图像,但它不尊重。在我的活动,我有:
getMenuInflater().inflate(R.menu.submit_action, menu);
我的submit_action是:
xmlns:app="http://schemas.android.com/apk/res-auto">
android:actionLayout="@layout/check"
app:showAsAction="always" />
我的支票布局是
style="?android:attr/actionButtonStyle"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#e8e8e8"
android:clickable="true"
android:contentDescription="lol" >
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:scaleType="centerInside"
android:src="@drawable/ic_action_tick" />
但是即使有了所有的设置,这是操作栏显示,不显示我的菜单(但它在那里,因为它响应的点击,但不出现):