• Home
Name Date Size #Lines LOC

..--

.google/03-May-2024-1914

Application/03-May-2024-702236

gradle/wrapper/03-May-2024-76

screenshots/03-May-2024-

CONTRIB.mdD03-May-20241.6 KiB3627

CONTRIBUTING.mdD03-May-20241.5 KiB3627

LICENSED03-May-202411.1 KiB202169

NOTICED03-May-2024613 1611

README.mdD03-May-20243.2 KiB8359

build.gradleD03-May-202410 110

gradlewD03-May-20245 KiB165122

gradlew.batD03-May-20242.3 KiB9166

packaging.yamlD03-May-2024498 1610

settings.gradleD03-May-202422 21

README.md

1Android ActionBarCompat-Basic Sample
2===================================
3
4This sample shows you how to use ActionBarCompat to create a basic Activity
5which displays action items. It covers inflating items from a menu resource,
6as well as adding an item in code.
7
8Introduction
9------------
10
11Android 3.0 introduced the “action bar” control, a toolbar that is expected
12to be present in most types of applications. This control identifies the user
13location, and provides user actions and navigation modes.
14Using the action bar offers your users a familiar interface across applications
15that the system gracefully adapts for different screen configurations.
16
17Instantiating an action bar can be done by using the [ActionBar][1] API provided
18in API 11 or above. Support for older devices is provided by the
19[support library’s ActionBar][2] implementation, compatible back to API 7.
20This sample demonstrates using the support library APIs.
21
22Using an ActionBar with the support library requires the following steps:
23
241. Create your activity by extending ActionBarActivity.
252. Use (or extend) one of the Theme.AppCompat themes for your activity.
26
27Once this is done, action items will be created for any options menu items that
28would otherwise be created during when `[onCreateOptionsMenu()][3]` is called.
29
30[1]: http://developer.android.com/reference/android/app/ActionBar.html
31[2]: http://developer.android.com/reference/android/support/v7/app/ActionBar.html
32[3]: http://developer.android.com/reference/android/app/Activity.html#onCreateOptionsMenu(android.view.Menu)
33
34Pre-requisites
35--------------
36
37- Android SDK v21
38- Android Build Tools v21.1.1
39- Android Support Repository
40
41Screenshots
42-------------
43
44<img src="screenshots/screenshot1.png" height="400" alt="Screenshot"/> <img src="screenshots/screenshot2.png" height="400" alt="Screenshot"/>
45
46Getting Started
47---------------
48
49This sample uses the Gradle build system. To build this project, use the
50"gradlew build" command or use "Import Project" in Android Studio.
51
52Support
53-------
54
55- Google+ Community: https://plus.google.com/communities/105153134372062985968
56- Stack Overflow: http://stackoverflow.com/questions/tagged/android
57
58If you've found an error in this sample, please file an issue:
59https://github.com/googlesamples/android-ActionBarCompat-Basic
60
61Patches are encouraged, and may be submitted by forking this project and
62submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
63
64License
65-------
66
67Copyright 2014 The Android Open Source Project, Inc.
68
69Licensed to the Apache Software Foundation (ASF) under one or more contributor
70license agreements.  See the NOTICE file distributed with this work for
71additional information regarding copyright ownership.  The ASF licenses this
72file to you under the Apache License, Version 2.0 (the "License"); you may not
73use this file except in compliance with the License.  You may obtain a copy of
74the License at
75
76http://www.apache.org/licenses/LICENSE-2.0
77
78Unless required by applicable law or agreed to in writing, software
79distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
80WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
81License for the specific language governing permissions and limitations under
82the License.
83