blob: 4f095531f407f1d91f3ad5aa3c771c9a7368d5bd [file] [log] [blame]
arthurthompson3e247912014-09-08 18:09:00 -07001<?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
18
19
20<sample>
21 <name>RecyclerView</name>
22 <group>UI</group>
23 <package>com.example.android.recyclerview</package>
24
Trevor Johnsc4fb9632014-12-08 16:14:12 -080025 <dependency>com.android.support:recyclerview-v7:21.0.2</dependency>
arthurthompson3e247912014-09-08 18:09:00 -070026
27 <!-- change minSdk if needed-->
28 <minSdk>7</minSdk>
29
30
31 <strings>
32 <intro>
33 <![CDATA[
Arthur Thompsona4c38042014-11-20 16:37:53 -080034 Demonstration of using RecyclerView with a LinearLayoutManager and GridLayoutManager
35 to create a vertical list. Tap \"SHOW LOG\" to view elements as they are bound to
36 their ViewHolder. The log also displays elements that you tap.
arthurthompson3e247912014-09-08 18:09:00 -070037 ]]>
38 </intro>
39 </strings>
40
Arthur Thompson84c91ec2014-12-11 20:51:42 -080041 <metadata>
42 <status>PUBLISHED</status>
43 <categories>UI, Views</categories>
44 <technologies>Android</technologies>
45 <languages>Java</languages>
46 <solutions>Mobile</solutions>
47 <level>INTERMEDIATE</level>
48 <api_refs>
49 <android>android.support.v7.widget.RecyclerView</android>
50 <android>android.support.v7.widget.LinearLayoutManager</android>
51 <android>android.support.v7.widget.GridLayoutManager</android>
52 <android>android.support.v7.widget.RecyclerView.ViewHolder</android>
53 </api_refs>
54 <icon>screenshots/icon-web.png</icon>
55 <screenshots>
56 <img>screenshots/1-linear.png</img>
57 <img>screenshots/2-grid.png</img>
58 </screenshots>
59 <description>
60<![CDATA[
61Sample demonstrating the use of RecyclerView to layout elements with a
62LinearLayoutManager and with a GridLayoutManager. It also demonstrates
63how to handle touch events on elements.
64]]>
65 </description>
66 <intro>
67<![CDATA[
68Sample demonstrating the use of [RecyclerView][1] to layout elements with a
69[LinearLayoutManager][2] or with a [GridLayoutManager][3].
70
71[RecyclerView][1] can display large datasets that can be scrolled
72efficiently by recycling a limited number of views. Click listeners can be
73defined when [ViewHolder][4] views are instantiated. [RecyclerView][1] is
74available in the v7 Support Library, thus compatible with API level 7 and above.
75
76Tap "Show Log" menu item to display log of elements as they are laid out and
77tapped. Use radio buttons to toggle between [LinearLayoutManager][2] and
78[GridLayoutManager][3].
79
80[1]: https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html
81[2]: https://developer.android.com/reference/android/support/v7/widget/LinearLayoutManager.html
82[3]: https://developer.android.com/reference/android/support/v7/widget/GridLayoutManager.html
83[4]: https://developer.android.com/reference/android/support/v7/widget/RecyclerView.ViewHolder.html
84]]>
85 </intro>
86 </metadata>
87
Arthur Thompsona4c38042014-11-20 16:37:53 -080088 <colors>
89 <color>
90 <name>colorPrimary</name>
91 <hexval>#00BCD4</hexval>
92 </color>
93 <color>
94 <name>colorPrimaryDark</name>
95 <hexval>#00838F</hexval>
96 </color>
97 </colors>
98
arthurthompson3e247912014-09-08 18:09:00 -070099 <template src="base"/>
100 <template src="FragmentView"/>
101 <common src="logger"/>
102 <common src="activities"/>
103</sample>