当前位置: 首页>>代码示例>>Java>>正文


Java BGARefreshLayout类代码示例

本文整理汇总了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();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:22,代码来源:RefreshNormalViewFragment.java

示例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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:23,代码来源:RefreshNormalViewFragment.java

示例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;
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:18,代码来源:ViewPagerActivity.java

示例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();
}
 
开发者ID:REBOOTERS,项目名称:AndroidAnimationExercise,代码行数:22,代码来源:BgaAllActivity.java

示例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();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:28,代码来源:RefreshScrollViewFragment.java

示例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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:29,代码来源:RefreshScrollViewFragment.java

示例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();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:28,代码来源:StickyNavScrollViewFragment.java

示例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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:29,代码来源:StickyNavScrollViewFragment.java

示例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;
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:ViewPagerActivity.java

示例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);
}
 
开发者ID:REBOOTERS,项目名称:AndroidAnimationExercise,代码行数:10,代码来源:BgaAllActivity.java

示例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;
}
 
开发者ID:REBOOTERS,项目名称:AndroidAnimationExercise,代码行数:11,代码来源:BgaAllActivity.java

示例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();
    }
}
 
开发者ID:haoguanqing,项目名称:Subreddit_Reader,代码行数:14,代码来源:MainFragment.java

示例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;
    }
}
 
开发者ID:haoguanqing,项目名称:Subreddit_Reader,代码行数:13,代码来源:MainFragment.java

示例14: onBGARefreshLayoutBeginRefreshing

import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
    mContentWv.reload();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:StickyNavWebViewFragment.java

示例15: onBGARefreshLayoutBeginLoadingMore

import cn.bingoogolapple.refreshlayout.BGARefreshLayout; //导入依赖的package包/类
@Override
public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) {
    Log.i(TAG, "加载更多");
    return false;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:StickyNavWebViewFragment.java


注:本文中的cn.bingoogolapple.refreshlayout.BGARefreshLayout类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。