您的位置:首页 > 其它

pulltorefreshlistview上拉下拉刷新时的标签

2016-12-06 10:40 453 查看
ptListView.setMode(PullToRefreshBase.Mode.BOTH);
ILoadingLayout refreshLayout = ptListView.getLoadingLayoutProxy(true,false);
refreshLayout.setPullLabel("下拉刷新...");// 刚下拉时,显示的提示
refreshLayout.setRefreshingLabel("正在载入...");// 刷新时
refreshLayout.setReleaseLabel("放开刷新...");// 下来达到一定距离时,显示的提示
ILoadingLayout loadLayout = ptListView.getLoadingLayoutProxy(false,true);
loadLayout.setPullLabel("上拉加载更多...");
loadLayout.setRefreshingLabel("正在载入...");
loadLayout.setReleaseLabel("放开加载...");
注意pulltorefreshlistview的标签默认颜色是白色,所以xml文件下记得修改颜色或者背景色
<com.handmark.pulltorefresh.library.PullToRefreshListViewandroid:layout_width="match_parent"android:layout_height="match_parent"android:id="@+id/pt_listview"android:background="@color/white"android:listSelector = "#00000000"android:divider="@color/common_bg"android:dividerHeight="1px"ptr:ptrAnimationStyle="flip"ptr:ptrHeaderBackground="@color/common_bg"//修改标签背景色ptr:ptrHeaderTextColor="@color/text_black"//修改标签颜色></com.handmark.pulltorefresh.library.PullToRefreshListView>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: