1 Android ActionBarCompat-ListPopupMenu Sample 2 =================================== 3 4 This sample shows how to display a pop up menu using PopupMenu from the v7 appcompat library. 5 6 Introduction 7 ------------ 8 9 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. 10 11 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]. 12 13 [1]: https://developer.android.com/reference/android/support/v7/widget/PopupMenu.html 14 [2]: https://developer.android.com/reference/android/support/v4/app/ListFragment.html 15 16 Pre-requisites 17 -------------- 18 19 - Android SDK v21 20 - Android Build Tools v21.1.1 21 - Android Support Repository 22 23 Screenshots 24 ------------- 25 26 <img src="screenshots/1-main.png" height="400" alt="Screenshot"/> <img src="screenshots/2-popup.png" height="400" alt="Screenshot"/> 27 28 Getting Started 29 --------------- 30 31 This sample uses the Gradle build system. To build this project, use the 32 "gradlew build" command or use "Import Project" in Android Studio. 33 34 Support 35 ------- 36 37 - Google+ Community: https://plus.google.com/communities/105153134372062985968 38 - Stack Overflow: http://stackoverflow.com/questions/tagged/android 39 40 If you've found an error in this sample, please file an issue: 41 https://github.com/googlesamples/android-ActionBarCompat-ListPopupMenu 42 43 Patches are encouraged, and may be submitted by forking this project and 44 submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details. 45 46 License 47 ------- 48 49 Copyright 2014 The Android Open Source Project, Inc. 50 51 Licensed to the Apache Software Foundation (ASF) under one or more contributor 52 license agreements. See the NOTICE file distributed with this work for 53 additional information regarding copyright ownership. The ASF licenses this 54 file to you under the Apache License, Version 2.0 (the "License"); you may not 55 use this file except in compliance with the License. You may obtain a copy of 56 the License at 57 58 http://www.apache.org/licenses/LICENSE-2.0 59 60 Unless required by applicable law or agreed to in writing, software 61 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 62 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 63 License for the specific language governing permissions and limitations under 64 the License. 65