android

来源:互联网 发布:java原理 编辑:程序博客网 时间:2024/05/29 17:45


使用起来还是非常简单的,在布局中,将android.support.v4.widget.SwipeRefreshLayout包裹在 Listview ScrollViewGridView等控件外部

代码中使用:

  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  3.     android:id="@+id/swipeRefreshLayout"  
  4.     android:layout_width="match_parent"  
  5.     android:layout_height="match_parent"  
  6.     android:orientation="vertical" >  
  7.   
  8.     <ListView  
  9.         android:id="@+id/listView"  
  10.         android:layout_width="match_parent"  
  11.         android:layout_height="match_parent"  
  12.         android:footerDividersEnabled="false" />  
  13.   
  14. </android.support.v4.widget.SwipeRefreshLayout>  
0 0