• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Copyright 2013 The Android Open Source Project
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9     http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17<sample>
18    <name>ActionBarCompat-ShareActionProvider</name>
19    <group>UI</group>
20    <package>com.example.android.actionbarcompat.shareactionprovider</package>
21
22    <dependency>com.android.support:appcompat-v7:21.0.2</dependency>
23
24    <!-- change minSdk if needed-->
25    <minSdk>7</minSdk>
26
27    <strings>
28        <intro>
29            <![CDATA[
30            This sample shows you how a provide a context-sensitive ShareActionProvider with
31            ActionBarCompat, backwards compatible to API v7.
32            ]]>
33        </intro>
34    </strings>
35
36    <template src="base"/>
37
38    <metadata>
39        <status>PUBLISHED</status>
40        <categories>UI, ActionBar</categories>
41        <technologies>Android</technologies>
42        <languages>Java</languages>
43        <solutions>Mobile</solutions>
44        <level>ADVANCED</level>
45        <icon>screenshots/icon-web.png</icon>
46        <screenshots>
47            <img>screenshots/1-gridview.png</img>
48            <img>screenshots/2-detail.png</img>
49        </screenshots>
50        <api_refs>
51            <android>android.support.v7.widget.ShareActionProvider</android>
52            <android>android.support.v7.app.ActionBarActivity</android>
53        </api_refs>
54        <description>
55<![CDATA[
56This sample shows you how a provide a context-sensitive ShareActionProvider with
57ActionBarCompat, backwards compatible to API v7.
58]]>
59        </description>
60        <intro>
61<![CDATA[
62The sample contains a [`ViewPager`][1] which displays content of differing types: image and
63text. When a new item is selected in the ViewPager, the [`ShareActionProvider`][2] is updated with
64a share intent specific to that content.
65
66This Activity extends from [`ActionBarActivity`][3], which provides all of the function
67necessary to display a compatible Action Bar on devices running Android v2.1+.
68
69[1]: http://developer.android.com/reference/android/support/v4/view/ViewPager.html
70[2]: http://developer.android.com/reference/android/widget/ShareActionProvider.html
71[3]: https://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html
72]]>
73        </intro>
74    </metadata>
75</sample>
76