您的位置:首页 > 其它

一. PullToRefreshScrollView xml 整体下拉刷新上拉加载

2017-12-21 10:25 204 查看
一. 导入依赖

compile 'com.github.userswlwork:pull-to-refresh:1.0.0'

二. 注意布局是在用 pullToRefreshScrollView
ListView是在用动态添加
<com.handmark.pulltorefresh.library.PullToRefreshScrollView
android:id="@+id/pull_ref"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.yuekaomoni.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<com.youth.banner.Banner
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_weight="1"
android:id="@+id/ban"
></com.youth.banner.Banner>

<com.example.yuekaomoni.Mylistview
android:id="@+id/My_list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2.5"></com.example.yuekaomoni.Mylistview>
</LinearLayout>

</com.handmark.pulltorefresh.library.PullToRefreshScrollView>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  PullToRefresh