本文整理汇总了Java中cn.bingoogolapple.refreshlayout.BGARefreshLayout类的典型用法代码示例。如果您正苦于以下问题:Java BGARefreshLayout类的具体用法?Java BGARefreshLayout怎么用?Java BGARefreshLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BGARefreshLayout类属于cn.bingoogolapple.refreshlayout包,在下文中一共展示了BGARefreshLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onBGARefreshLayoutBeginRefreshing
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params) {
try {
Thread.sleep(MainActivity.LOADING_DURATION);
} catch (InterruptedException e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
mRefreshLayout.endRefreshing();
mClickableLabelTv.setText("加载最新数据完成");
}
}.execute();
}
示例2: onBGARefreshLayoutBeginLoadingMore
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) {
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params) {
try {
Thread.sleep(MainActivity.LOADING_DURATION);
} catch (InterruptedException e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
mRefreshLayout.endLoadingMore();
Log.i(TAG, "上拉加载更多完成");
}
}.execute();
return true;
}
示例3: onBGARefreshLayoutBeginRefreshing
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
switch (mContentVp.getCurrentItem()) {
case 0:
mRecyclerViewFragment.onBGARefreshLayoutBeginRefreshing(refreshLayout);
break;
case 1:
mListViewFragment.onBGARefreshLayoutBeginRefreshing(refreshLayout);
break;
case 2:
mScrollViewFragment.onBGARefreshLayoutBeginRefreshing(refreshLayout);
break;
case 3:
mWebViewFragment.onBGARefreshLayoutBeginRefreshing(refreshLayout);
break;
}
}
示例4: onCreate
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mContext = this;
setContentView(R.layout.activity_bga_all);
Toolbar mToolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(mToolbar);
mBGARefreshLayout = (BGARefreshLayout) findViewById(R.id.rl_modulename_refresh);
mBGARefreshLayout.setDelegate(this);
BGANormalRefreshViewHolder mRefreshViewHolder = new BGANormalRefreshViewHolder(this, true);
mBGARefreshLayout.setRefreshViewHolder(mRefreshViewHolder);
RecyclerView mRecyclerView = (RecyclerView) findViewById(R.id.recyclerview);
mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext));
mContentAdapter = new ContentAdapter(mRecyclerView);
mContentAdapter.addHeaderView(getHeadView());
mRecyclerView.setAdapter(mContentAdapter.getHeaderAndFooterAdapter());
initData();
//
mBGARefreshLayout.beginRefreshing();
}
示例5: onBGARefreshLayoutBeginRefreshing
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
new AsyncTask<Void, Void, Void>() {
@Override
protected void onPreExecute() {
showLoadingDialog();
}
@Override
protected Void doInBackground(Void... params) {
try {
Thread.sleep(MainActivity.LOADING_DURATION);
} catch (InterruptedException e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
dismissLoadingDialog();
mRefreshLayout.endRefreshing();
mClickableLabelTv.setText("加载最新数据完成");
}
}.execute();
}
示例6: onBGARefreshLayoutBeginLoadingMore
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) {
new AsyncTask<Void, Void, Void>() {
@Override
protected void onPreExecute() {
showLoadingDialog();
}
@Override
protected Void doInBackground(Void... params) {
try {
Thread.sleep(MainActivity.LOADING_DURATION);
} catch (InterruptedException e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
dismissLoadingDialog();
mRefreshLayout.endLoadingMore();
Log.i(TAG, "上拉加载更多完成");
}
}.execute();
return true;
}
示例7: onBGARefreshLayoutBeginRefreshing
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
new AsyncTask<Void, Void, Void>() {
@Override
protected void onPreExecute() {
showLoadingDialog();
}
@Override
protected Void doInBackground(Void... params) {
try {
Thread.sleep(MainActivity.LOADING_DURATION);
} catch (InterruptedException e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
dismissLoadingDialog();
((ViewPagerActivity) getActivity()).endRefreshing();
mClickableLabelTv.setText("加载最新数据完成");
}
}.execute();
}
示例8: onBGARefreshLayoutBeginLoadingMore
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) {
new AsyncTask<Void, Void, Void>() {
@Override
protected void onPreExecute() {
showLoadingDialog();
}
@Override
protected Void doInBackground(Void... params) {
try {
Thread.sleep(MainActivity.LOADING_DURATION);
} catch (InterruptedException e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
dismissLoadingDialog();
((ViewPagerActivity) getActivity()).endLoadingMore();
Log.i(TAG, "上拉加载更多完成");
}
}.execute();
return true;
}
示例9: onBGARefreshLayoutBeginLoadingMore
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) {
switch (mContentVp.getCurrentItem()) {
case 0:
return mRecyclerViewFragment.onBGARefreshLayoutBeginLoadingMore(refreshLayout);
case 1:
return mListViewFragment.onBGARefreshLayoutBeginLoadingMore(refreshLayout);
case 2:
return mScrollViewFragment.onBGARefreshLayoutBeginLoadingMore(refreshLayout);
case 3:
return mWebViewFragment.onBGARefreshLayoutBeginLoadingMore(refreshLayout);
default:
return false;
}
}
示例10: onBGARefreshLayoutBeginRefreshing
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mBGARefreshLayout.endRefreshing();
}
}, 1000);
}
示例11: onBGARefreshLayoutBeginLoadingMore
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mBGARefreshLayout.endLoadingMore();
}
}, 1000);
return true;
}
示例12: onBGARefreshLayoutBeginRefreshing
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
// refresh and load more data
if (isNetworkEnabled()) {
// if network is available, load data
frontPage = new SubredditPaginator(redditClient);
new DataRetrieveTask(frontPage, mAdapter, mRefreshLayout).execute();
} else {
// network unavailable, finish drag down refreshing
ToastUtil.show("Network unavailable");
mRefreshLayout.endRefreshing();
}
}
示例13: onBGARefreshLayoutBeginLoadingMore
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) {
// load more data
if (isNetworkEnabled()) {
new LoadMoreTask(frontPage, mAdapter, mRefreshLayout).execute();
return true;
} else {
// network unavailable, return false
ToastUtil.show("Network unavailable");
return false;
}
}
示例14: onBGARefreshLayoutBeginRefreshing
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
mContentWv.reload();
}
示例15: onBGARefreshLayoutBeginLoadingMore
import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) {
Log.i(TAG, "加载更多");
return false;
}