0

I have just managed to put actionbar tab menu into my application now i have 5 tabs which are mostly important in application, now i want to put "Options" icon in action bar where user will have access to options and few other forms. If someone can help me with any code examples as i tryed with developer.android.com but i didnt suceedd.

Here is example of what i am looking for:

enter image description here

Tabs are already done now i want to implement this (3 dots last icon on the right) as options menu.

4

1 回答 1

0

使用 android:showAsAction="never" 将您的额外操作添加到菜单中:

<!-- Settings should always be in the overflow -->
<item android:id="@+id/action_settings"
    android:title="@string/action_settings"
    android:orderInCategory="100"
    android:showAsAction="never" />

但是,溢出按钮(带有三个点的图标)仅在您的设备没有硬件菜单按钮时才会出现。这里的“菜单”会带来额外的动作。在没有硬件按钮的设备上,将显示溢出按钮。

通过设置不同的 AVD,您可能会看到差异。

(来源:http: //developer.android.com/guide/topics/ui/actionbar.html#ActionItems

于 2013-08-21T15:04:31.343 回答