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


Java XRecyclerView类代码示例

本文整理汇总了Java中com.jcodecraeer.xrecyclerview.XRecyclerView的典型用法代码示例。如果您正苦于以下问题:Java XRecyclerView类的具体用法?Java XRecyclerView怎么用?Java XRecyclerView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


XRecyclerView类属于com.jcodecraeer.xrecyclerview包,在下文中一共展示了XRecyclerView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUpRecyclerView

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
public void setUpRecyclerView() {
    mRecyclerView.setUpAsGrid(mGridColumnCount);
    mRecyclerView.setAdapter(mAdapter);

    mRecyclerView.setPullRefreshEnabled(true);
    mRecyclerView.setLoadingMoreEnabled(false);
    mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            mPresenter.getData(false);
        }

        @Override
        public void onLoadMore() {
        }
    });
}
 
开发者ID:derohimat,项目名称:SgPSI,代码行数:19,代码来源:PsiListActivity.java

示例2: onCreateView

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View view = inflater.inflate(R.layout.fragment_all_earth, container, false);
    ButterKnife.bind(this, view);
    presenter = new GlobalPresenter(this);
    presenter.getGlobalData();
    createData();
    rv.setArrowImageView(R.drawable.person_global_fresh_view);
    rv.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            rv.refreshComplete();
        }

        @Override
        public void onLoadMore() {
             rv.loadMoreComplete();
        }
    });
    return view;
}
 
开发者ID:guxiaonian,项目名称:MeiLa_GNN,代码行数:24,代码来源:GlobalFragment.java

示例3: setupRecycleView

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
private void setupRecycleView() {
    LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
    layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    mRecyclerView.setLayoutManager(layoutManager);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallSpinFadeLoader);
    mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);

    mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            onRecyclerViewResponseRefresh();
        }

        @Override
        public void onLoadMore() {
            onRecycleViewResponseLoadMore();
        }
    });

    setupRecycleViewAndAdapter();
}
 
开发者ID:henryblue,项目名称:TeaCup,代码行数:23,代码来源:BaseFragment.java

示例4: setupRecyclerView

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
private void setupRecyclerView() {
    mRecyclerView.setLayoutManager(new StaggeredGridLayoutManager(3,
            StaggeredGridLayoutManager.VERTICAL));
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());

    mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            mLoadIndex = 1;
            startRefreshData();
        }

        @Override
        public void onLoadMore() {
            if (mDatas.size() <= 0) {
                mRecyclerView.loadMoreComplete();
            } else {
                startLoadData();
            }
        }
    });
    mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallSpinFadeLoader);
    mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
}
 
开发者ID:henryblue,项目名称:TeaCup,代码行数:25,代码来源:MoreMovieShowActivity.java

示例5: initView

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
private void initView() {
    mDatas = new ArrayList<>();
    mRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.srl_refresh);
    mRecyclerView = (XRecyclerView) findViewById(R.id.base_recycler_view);
    mSearchBtn = (FloatingActionButton) findViewById(R.id.fanju_new_btn_search);
    LinearLayoutManager layoutManager = new LinearLayoutManager(this);
    layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    mRecyclerView.setLayoutManager(layoutManager);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mRecyclerView.setPullRefreshEnabled(false);
    mRecyclerView.setLoadingMoreEnabled(false);

    mSearchBtn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            showSearchDialog();
        }
    });

}
 
开发者ID:henryblue,项目名称:TeaCup,代码行数:21,代码来源:FanjuNewsActivity.java

示例6: initRecyclerView

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
private void initRecyclerView() {
    rvList.setPullRefreshEnabled(true);
    rvList.setLoadingMoreEnabled(true);
    rvList.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            resetDatas();
            presenter.getTypeGankList();
        }

        @Override
        public void onLoadMore() {
            presenter.getTypeGankList();
        }
    });
}
 
开发者ID:mapleslong,项目名称:MPGankIO,代码行数:17,代码来源:TypeFragment.java

示例7: setUpRecyclerView

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
private void setUpRecyclerView() {
    mRecyclerView.setHasFixedSize(true);
    LinearLayoutManager llm = new LinearLayoutManager(getActivity());
    mRecyclerView.setLayoutManager(llm);
    mRecyclerView.setAdapter(mAdapter);

    mRecyclerView.setPullRefreshEnabled(true);
    mRecyclerView.setLoadingMoreEnabled(false);
    mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            mPresenter.loadForcast("Bandung");
        }

        @Override
        public void onLoadMore() {

        }
    });
}
 
开发者ID:derohimat,项目名称:android-base-mvp,代码行数:21,代码来源:DetailFragment.java

示例8: initEvent

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
protected void initEvent() {
    mRvJoke.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            mIsRefresh = true;
            mIsLoadMore = false;
            mHomePresenter.requestGet();
        }

        @Override
        public void onLoadMore() {
            mIsRefresh = false;
            mIsLoadMore = true;
            mHomePresenter.requestGet();
        }
    });

    mFabButton.setOnClickListener(this);
}
 
开发者ID:GaoGersy,项目名称:LiveShow,代码行数:21,代码来源:TextFragment.java

示例9: initEvent

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
protected void initEvent() {
    mRvJoke.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            mIsRefresh = true;
            mIsLoadMore = false;
            mRandomFragmentPresenter.requestGet();
        }

        @Override
        public void onLoadMore() {
            mIsRefresh = false;
            mIsLoadMore = true;
            mRandomFragmentPresenter.requestGet();
        }
    });

}
 
开发者ID:GaoGersy,项目名称:LiveShow,代码行数:20,代码来源:RandomFragment.java

示例10: initEvent

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
protected void initEvent() {
    mRvJoke.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            mIsRefresh = true;
            mIsLoadMore = false;
            mPictureFragmentPresenter.requestGet();
        }

        @Override
        public void onLoadMore() {
            mIsLoadMore = true;
            mIsRefresh = false;
            mPictureFragmentPresenter.requestGet();
        }
    });

    mFabButton.setOnClickListener(this);
}
 
开发者ID:GaoGersy,项目名称:LiveShow,代码行数:21,代码来源:PictureFragment.java

示例11: initEvent

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
protected void initEvent() {
    mRvJoke.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            mIsRefresh = true;
            mIsLoadMore = false;
            mWeChatFragmentPresenter.requestGet();
        }

        @Override
        public void onLoadMore() {
            mIsLoadMore = true;
            mIsRefresh = false;
            mWeChatFragmentPresenter.requestGet();
        }
    });
    mBaseRVAdapter.setOnItemClickListener(this);
}
 
开发者ID:GaoGersy,项目名称:LiveShow,代码行数:20,代码来源:WeChatFragment.java

示例12: initView

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
protected void initView() {
    mFABSearch = customFindViewById(R.id.fab_search);
    LinearLayoutManager LayoutManager = new LinearLayoutManager(getContext());
    mRecyclerView = customFindViewById(R.id.recyclerview);
    mBookAdapter = new BookAdapter(getMContext(), new ArrayList<BookBean>());
    mRecyclerView.setAdapter(mBookAdapter);
    mRecyclerView.setLayoutManager(LayoutManager);
    mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            switchAction(ACTION_REFRESH);
        }

        @Override
        public void onLoadMore() {
            switchAction(ACTION_LOAD_MORE);
        }
    });
    mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallClipRotatePulse);
    mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.SquareSpin);
    mFABSearch.setOnClickListener(this);
    initInputDialog();
    dynamicAddSkinView(mFABSearch, "backgroundTint", R.color.colorAccent);
}
 
开发者ID:XinRan5312,项目名称:QxChangeThemeSkin,代码行数:26,代码来源:BookFragment.java

示例13: init

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
public void init() {
    mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
    mRecyclerView.setAdapter(new ShopCirRecyclerViewAdapter(DummyContent.ITEMS, mListener));
    mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            //refresh data here
            new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
                @Override
                public void run() {
                    mRecyclerView.refreshComplete();
                }
            },3000);
        }

        @Override
        public void onLoadMore() {
            // load more data here
            new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
                @Override
                public void run() {
                    mRecyclerView.loadMoreComplete();
                }
            },3000);
        }
    });
    mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
    mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);

}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:32,代码来源:ShopFragment.java

示例14: init

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
    public void init() {
        mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
//        mRecyclerView.setAdapter(new ShopCirRecyclerViewAdapter(DummyContent.ITEMS, mListener));
        mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
            @Override
            public void onRefresh() {
                //refresh data here
                new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        mRecyclerView.refreshComplete();
                    }
                },3000);
            }

            @Override
            public void onLoadMore() {
                // load more data here
                new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        mRecyclerView.loadMoreComplete();
                    }
                },3000);
            }
        });
        mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
        mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);


        showEmptyView(R.layout.combo_empty);
    }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:34,代码来源:ComboSelectedFragment.java

示例15: init

import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
public void init() {
    mListener = new OnItemClickListener() {
        @Override
        public void onItemClick(int position) {
            startActivity(new Intent(getActivity(), OrderDetailActivity.class), true);
        }
    };
    mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
    mRecyclerView.setAdapter(new OrderRecyclerViewAdapter(DummyContent.ITEMS, mListener));
    mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
        @Override
        public void onRefresh() {
            //refresh data here
            new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
                @Override
                public void run() {
                    mRecyclerView.refreshComplete();
                }
            }, 3000);
        }

        @Override
        public void onLoadMore() {
            // load more data here
            new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
                @Override
                public void run() {
                    mRecyclerView.loadMoreComplete();
                }
            }, 3000);
        }
    });
    mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
    mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:37,代码来源:OrderFragment.java


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