to top
Android APIs
 

content_actions.xml

← Back

The file containing the source code shown below is located in the corresponding directory in <sdk>/samples/android-<version>/...

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 Google Inc.

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/action_search"
          android:icon="@android:drawable/ic_menu_search"
          android:title="@string/action_bar_search"
          android:showAsAction="always"
          android:actionViewClass="android.widget.SearchView" />
    <item android:id="@+id/menu_item_share_action_provider_action_bar"
          android:showAsAction="always"
          android:title="@string/action_bar_share_with"
          android:actionProviderClass="android.widget.ShareActionProvider" />
    <group android:id="@+id/show_tabs_group"
            android:checkableBehavior="single">
        <item android:id="@+id/show_tabs"
                android:title="Show Tabs"
                android:showAsAction="never" />
        <item android:id="@+id/hide_tabs"
                android:title="Hide Tabs"
                android:checked="true"
                android:showAsAction="never" />
    </group>
    <group android:id="@+id/stable_layout_group"
            android:checkableBehavior="all">
        <item android:id="@+id/stable_layout"
                android:title="Stable Layout"
                android:checked="true"
                android:showAsAction="never" />
    </group>
    <item android:id="@+id/action_share"
          android:icon="@android:drawable/ic_menu_share"
          android:title="@string/action_bar_share"
          android:showAsAction="ifRoom" />
    <item android:id="@+id/action_sort"
          android:icon="@android:drawable/ic_menu_sort_by_size"
          android:title="@string/action_bar_sort"
          android:showAsAction="ifRoom">
        <menu>
            <item android:id="@+id/action_sort_size"
                  android:icon="@android:drawable/ic_menu_sort_by_size"
                  android:title="@string/action_bar_sort_size"
                  android:onClick="onSort" />
            <item android:id="@+id/action_sort_alpha"
                  android:icon="@android:drawable/ic_menu_sort_alphabetically"
                  android:title="@string/action_bar_sort_alpha"
                  android:onClick="onSort" />
        </menu>
    </item>
</menu>