Home | History | Annotate | Download | only in SwipeRefreshListFragment
      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>SwipeRefreshListFragment</name>
     22     <group>UI</group>
     23     <package>com.example.android.swiperefreshlistfragment</package>
     24     <minSdk>14</minSdk>
     25     <strings>
     26         <intro>
     27             <![CDATA[
     28             A sample which shows how to use SwipeRefreshLayout within a ListFragment to add the
     29             \'swipe-to-refresh\' gesture to a ListView, enabling the ability to trigger a refresh
     30             from swiping down on that view. This is provided through the re-usable
     31             SwipeRefreshListFragment class.
     32             ]]>
     33         </intro>
     34     </strings>
     35 
     36     <template src="base"/>
     37     <template src="FragmentView"/>
     38     <common src="logger"/>
     39     <common src="activities"/>
     40     <common src="view"/>
     41     <common src="dummydata"/>
     42 
     43     <metadata>
     44         <status>PUBLISHED</status>
     45         <categories>UI, Input</categories>
     46         <technologies>Android</technologies>
     47         <languages>Java</languages>
     48         <solutions>Mobile</solutions>
     49         <level>INTERMEDIATE</level>
     50         <icon>screenshots/icon-web.png</icon>
     51         <screenshots>
     52             <img>screenshots/refresh.png</img>
     53         </screenshots>
     54         <api_refs>
     55             <android>android.support.v4.widget.SwipeRefreshLayout</android>
     56             <android>android.widget.ArrayAdapter</android>
     57             <android>android.widget.ListAdapter</android>
     58             <android>android.support.v4.app.ListFragment</android>
     59         </api_refs>
     60         <description>
     61 <![CDATA[
     62 A sample which shows how to use `SwipeRefreshLayout` to add
     63 'swipe-to-refresh' gesture to a ListView, enabling the ability to trigger a refresh
     64 from swiping down on that view.
     65 ]]>
     66         </description>
     67         <intro>
     68 <![CDATA[
     69 A sample which shows how to use
     70 [SwipeRefreshLayout][1] within a `ListFragment` to add the 'swipe-to-refresh'
     71 gesture to a `ListView`. The sample provides this functionality by defining a
     72 re-usable `SwipeRefreshListFragment` class.
     73 
     74 The sample displays a list of cheeses. When the user initiates a downward swipe,
     75 that list refreshes with randomly generated items. Selecting the `Refresh`
     76 action from the action bar also refreshes the list.
     77 
     78 [1]: https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html
     79 ]]>
     80         </intro>
     81     </metadata>
     82 </sample>
     83