Home | History | Annotate | Download | only in RecyclerView
      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 
     18 
     19 
     20 <sample>
     21     <name>RecyclerView</name>
     22     <group>UI</group>
     23     <package>com.example.android.recyclerview</package>
     24 
     25     <dependency>com.android.support:recyclerview-v7:21.0.2</dependency>
     26 
     27     <!-- change minSdk if needed-->
     28     <minSdk>7</minSdk>
     29 
     30 
     31     <strings>
     32         <intro>
     33             <![CDATA[
     34                 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.
     37             ]]>
     38         </intro>
     39     </strings>
     40 
     41     <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[
     61 Sample demonstrating the use of RecyclerView to layout elements with a
     62 LinearLayoutManager and with a GridLayoutManager. It also demonstrates
     63 how to handle touch events on elements.
     64 ]]>
     65         </description>
     66         <intro>
     67 <![CDATA[
     68 Sample 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
     72 efficiently by recycling a limited number of views. Click listeners can be
     73 defined when [ViewHolder][4] views are instantiated. [RecyclerView][1] is
     74 available in the v7 Support Library, thus compatible with API level 7 and above.
     75 
     76 Tap "Show Log" menu item to display log of elements as they are laid out and
     77 tapped. 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 
     88     <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 
     99     <template src="base"/>
    100     <template src="FragmentView"/>
    101     <common src="logger"/>
    102     <common src="activities"/>
    103 </sample>
    104