【发布时间】:2014-12-27 15:43:24
【问题描述】:
我有一个使用 SupportActionBar 的应用。我正在使用自定义视图进行操作。
问题是,当我长按时默认操作会显示工具提示,但我的自定义操作不会。
所以这是默认操作(如您所见,有一个工具提示):
这是我的自定义操作(没有工具提示:/):
这 2 个的 xml:
<menu
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto">
<item
android:visible="false"
android:title="Clear history"
android:id="@+id/action_clear_history"
custom:showAsAction="always"
android:icon="@drawable/ic_action_trash" />
<item
android:title="Open chat"
android:id="@+id/action_chat"
custom:showAsAction="always"
custom:actionLayout="@layout/ab_chat" />
</menu>
有人可以帮忙吗?
【问题讨论】:
-
你有答案吗? @亚瑟
-
一有时间我就会发布更新;)你知道的优先事项:D
-
看我的答案,它易于实施,它的工作我的目的
标签: android android-actionbar actionview android-actionbar-compat