• 使用google自带包实现下拉刷新功能


    android 实现下拉刷新有非常多开源的源代码能够用 比方 :PullToRefreshListView  使用起来也非常方便

    如今还能够直接使用google libs以下的 android-support-v4.jar 这个包来实现了,请更新你的sdk到最新

    使用 xml 布局

    <android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/refresh"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
      
         >
    <ListView
       android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/listview"
        ></ListView>
      

    </android.support.v4.widget.SwipeRefreshLayout>

    最外层是 android.support.v4包里面的一个类 SwipeRefreshLayout ,在它里面放入随意view控件即可了。

    代码里面:

    SwipeRefreshLayout 详细的方法,大家看看api文档

    项目里面的  android-support-v4.jar 可能没有SwipeRefreshLayout这个类,我已上传上来了,能够到这里下载

     下载包

  • 相关阅读:
    用jQuery写的一个简单的弹出窗口(IE7\IE8\FF3)
    live write test
    sql2
    查询所有表索引
    java初学问题记录(2012.02.092012.02.16)
    SQL
    centso7网卡bond
    vmware模板
    Dockerfile参考
    Docker简单介绍
  • 原文地址:https://www.cnblogs.com/gcczhongduan/p/4378126.html
Copyright © 2020-2023  润新知