首先添加pullrefresh的libaraly
设置下拉刷新上拉加载时的文本和图片,直接在java代码中添加
mPullToRefreshScrollView.getLoadingLayoutProxy(true,true).setLoadingDrawable(getActivity().getResources().getDrawable(R.drawable.default_ptr_rotate));
// 下拉刷新时的提示文本设置
mPullToRefreshScrollView.getLoadingLayoutProxy(true, false).setPullLabel("下拉刷新");
mPullToRefreshScrollView.getLoadingLayoutProxy(true, false).setRefreshingLabel("正在加载...");
mPullToRefreshScrollView.getLoadingLayoutProxy(true, false).setReleaseLabel("放开以刷新");
// 上拉加载更多时的提示文本设置
mPullToRefreshScrollView.getLoadingLayoutProxy(false, true).setPullLabel("上拉加载");
mPullToRefreshScrollView.getLoadingLayoutProxy(false, true).setRefreshingLabel("正在加载...");
mPullToRefreshScrollView.getLoadingLayoutProxy(false, true).setReleaseLabel("放开以加载");