You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.5 KiB
71 lines
2.5 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Copyright 2013 The Android Open Source Project
|
|
|
|
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.
|
|
-->
|
|
<sample>
|
|
<name>ActionBarCompat-ListPopupMenu</name>
|
|
<group>UI</group>
|
|
<package>com.example.android.actionbarcompat.listpopupmenu</package>
|
|
|
|
<!-- change minSdk if needed-->
|
|
<minSdk>14</minSdk>
|
|
|
|
<strings>
|
|
<intro>
|
|
<![CDATA[
|
|
This sample shows you how to use {@link android.support.v7.widget.PopupMenu PopupMenu}
|
|
from ActionBarCompat to create a list, with each item having a dropdown menu.
|
|
]]>
|
|
</intro>
|
|
</strings>
|
|
|
|
<template src="base"/>
|
|
|
|
<metadata>
|
|
<status>PUBLISHED</status>
|
|
<categories>UI</categories>
|
|
<technologies>Android</technologies>
|
|
<languages>Java</languages>
|
|
<solutions>Mobile</solutions>
|
|
<level>INTERMEDIATE</level>
|
|
<icon>screenshots/icon-web.png</icon>
|
|
<screenshots>
|
|
<img>screenshots/1-main.png</img>
|
|
<img>screenshots/2-popup.png</img>
|
|
</screenshots>
|
|
<api_refs>
|
|
<android>android.support.v7.widget.PopupMenu</android>
|
|
</api_refs>
|
|
|
|
<description>
|
|
<![CDATA[
|
|
This sample shows how to display a pop up menu using PopupMenu from the v7 appcompat library.
|
|
]]>
|
|
</description>
|
|
|
|
<intro>
|
|
<![CDATA[
|
|
This sample displays a list of items and for each item, an icon can be clicked. When it is clicked, a pop up menu is shown, placed below the item, using the [PopupMenu][1] from the v7 appcompat support library.
|
|
|
|
The sample uses [ListFragment][2] from the v4 support library to display the list. It shows how to instantiate and display the [PopupMenu][1], as well as how to use `setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener())` to process the user actions on the [PopupMenu][1].
|
|
|
|
[1]: https://developer.android.com/reference/android/support/v7/widget/PopupMenu.html
|
|
[2]: https://developer.android.com/reference/android/support/v4/app/ListFragment.html
|
|
]]>
|
|
</intro>
|
|
</metadata>
|
|
|
|
</sample>
|