加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

PullToRefreshListView xml 写法

发布时间:2020-12-16 09:15:24 所属栏目:百科 来源:网络整理
导读:xml 代码 : com.handmark.pulltorefresh.library.PullToRefreshListView xmlns:ptr="http://schemas.android.com/apk/res-auto" android:id="@+id/pull_refresh_list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:lay

xml 代码 :

<com.handmark.pulltorefresh.library.PullToRefreshListView

xmlns:ptr="http://schemas.android.com/apk/res-auto"
android:id="@+id/pull_refresh_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="#eeeeee"
android:cacheColorHint="#00000000"
android:divider="#00000000"
android:fadingEdge="none"
android:fastScrollEnabled="true"
android:footerDividersEnabled="false"
android:headerDividersEnabled="false"
android:listSelector="#00000000"
android:overScrollMode="never"
android:scrollbars="none"
android:smoothScrollbar="true"
ptr:ptrAnimationStyle="flip"
ptr:ptrHeaderBackground="#a0ffffff"
ptr:ptrHeaderTextColor="#606060"
ptr:ptrMode="both"
ptr:ptrOverScroll="false"
ptr:ptrShowIndicator="false"
ptr:ptrDrawable="@drawable/ic_launcher"

/>


/**

*PullToRefreshListView工具类

**/

public class PullToRefreshListViewUtil { /** * 设置操作PullToRefreshListView时提示文字 * @param listView */ public static void setPullText(PullToRefreshListView listView) { listView.getLoadingLayoutProxy().setPullLabel("下拉可刷新"); listView.getLoadingLayoutProxy().setReleaseLabel("释放刷新"); listView.getLoadingLayoutProxy().setRefreshingLabel("正在刷新中..."); listView.getLoadingLayoutProxy(false,true).setPullLabel("上拉加载更多"); listView.getLoadingLayoutProxy(false,true).setReleaseLabel("释放刷新"); listView.getLoadingLayoutProxy(false,true).setRefreshingLabel("正在加载中..."); } }

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读