【发布时间】:2012-01-30 02:00:31
【问题描述】:
我正在使用操作栏。我想在标题栏上有一个刷新进度微调器,如果我将它设置为旋转 - 否则隐藏它。这可能吗?:
// My menu has a refresh item, but it shouldn't be visible on the
// actionbar unless it's spinning.
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_refresh"
android:title="@string/refresh"
android:icon="@drawable/ic_action_refresh" />
</menu>
...
// When I need to show some work being done on my activity,
// can I somehow now make the spinner associated with the
// refresh item become visible on the action bar?
getActionBarHelper().setRefreshActionItemState(true);
我不希望它出现在 ActionBar 上,除非它“正在进行”/正在旋转。
谢谢
【问题讨论】: