本文整理汇总了Java中cn.droidlover.xrecyclerview.RecyclerItemCallback类的典型用法代码示例。如果您正苦于以下问题:Java RecyclerItemCallback类的具体用法?Java RecyclerItemCallback怎么用?Java RecyclerItemCallback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RecyclerItemCallback类属于cn.droidlover.xrecyclerview包,在下文中一共展示了RecyclerItemCallback类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getAdapter
import cn.droidlover.xrecyclerview.RecyclerItemCallback; //导入依赖的package包/类
@Override
public SimpleRecAdapter getAdapter() {
if (adapter == null) {
adapter = new HomeAdapter(context);
adapter.setRecItemClick(new RecyclerItemCallback<GankResults.Item, HomeAdapter.ViewHolder>() {
@Override
public void onItemClick(int position, GankResults.Item model, int tag, HomeAdapter.ViewHolder holder) {
super.onItemClick(position, model, tag, holder);
switch (tag) {
case HomeAdapter.TAG_VIEW:
WebActivity.launch(context, model.getUrl(), model.getDesc());
break;
}
}
});
}
return adapter;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:19,代码来源:HomeFragment.java
示例2: getAdapter
import cn.droidlover.xrecyclerview.RecyclerItemCallback; //导入依赖的package包/类
@Override
public SimpleRecAdapter getAdapter() {
if (adapter == null) {
adapter = new GanhuoAdapter(context);
adapter.setRecItemClick(new RecyclerItemCallback<GankResults.Item, GanhuoAdapter.ViewHolder>() {
@Override
public void onItemClick(int position, GankResults.Item model, int tag, GanhuoAdapter.ViewHolder holder) {
super.onItemClick(position, model, tag, holder);
switch (tag) {
case GanhuoAdapter.TAG_VIEW:
WebActivity.launch(context, model.getUrl(), model.getDesc());
break;
}
}
});
}
return adapter;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:19,代码来源:GanhuoFragment.java
示例3: getAdapter
import cn.droidlover.xrecyclerview.RecyclerItemCallback; //导入依赖的package包/类
@Override
public SimpleRecAdapter getAdapter() {
if (adapter == null) {
adapter = new GirlAdapter(context);
adapter.setRecItemClick(new RecyclerItemCallback<GankResults.Item, GirlAdapter.ViewHolder>() {
@Override
public void onItemClick(int position, GankResults.Item model, int tag, GirlAdapter.ViewHolder holder) {
super.onItemClick(position, model, tag, holder);
}
});
}
return adapter;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:GirlFragment.java
示例4: getAdapter
import cn.droidlover.xrecyclerview.RecyclerItemCallback; //导入依赖的package包/类
public SimpleRecAdapter getAdapter() {
if (mAdapter == null) {
mAdapter = new ShortVideoAdapter(context);
mAdapter.setRecItemClick(new RecyclerItemCallback<MovieInfo.Item, ShortVideoAdapter.ViewHolder>() {
@Override
public void onItemClick(int position, MovieInfo.Item model, int tag, ShortVideoAdapter.ViewHolder holder) {
super.onItemClick(position, model, tag, holder);
}
});
}
return mAdapter;
}
开发者ID:lzmlsfe,项目名称:19porn,代码行数:13,代码来源:ShortVideoFragment.java
示例5: getAdapter
import cn.droidlover.xrecyclerview.RecyclerItemCallback; //导入依赖的package包/类
public SimpleRecAdapter getAdapter() {
if (mAdapter == null) {
mAdapter = new ShortVideoAdapter(context);
((ShortVideoAdapter)mAdapter).setIsSeriesVideoAdapter(true);
mAdapter.setRecItemClick(new RecyclerItemCallback<MovieInfo.Item, ShortVideoAdapter.ViewHolder>() {
@Override
public void onItemClick(int position, MovieInfo.Item model, int tag, ShortVideoAdapter.ViewHolder holder) {
super.onItemClick(position, model, tag, holder);
}
});
}
return mAdapter;
}
开发者ID:lzmlsfe,项目名称:19porn,代码行数:14,代码来源:PlayHistoryFragment.java
示例6: getAdapter
import cn.droidlover.xrecyclerview.RecyclerItemCallback; //导入依赖的package包/类
public SimpleRecAdapter getAdapter() {
if (mType == 0) {
if(mAccountAdapter == null)
mAccountAdapter = new AccountDetailAdapter(context);
return mAccountAdapter;
}
if (mType == 1) {
if(mChargeAdapter == null){
mChargeAdapter = new ChargeDetailAdapter(context);
mChargeAdapter.setRecItemClick(new RecyclerItemCallback<AccountManager.ChargeItem, ChargeDetailAdapter.ViewHolder>() {
@Override
public void onItemClick(int position, AccountManager.ChargeItem model, int tag, ChargeDetailAdapter.ViewHolder holder) {
super.onItemClick(position, model, tag, holder);
}
});
}
return mChargeAdapter;
}
if (mType == 2) {
if(mAwardDetailAdapter == null){
mAwardDetailAdapter = new AwardDetailAdapter(context);
}
return mAwardDetailAdapter;
}
return null;
}
开发者ID:lzmlsfe,项目名称:19porn,代码行数:31,代码来源:AccountDetailFragment.java
示例7: initAdapter
import cn.droidlover.xrecyclerview.RecyclerItemCallback; //导入依赖的package包/类
private void initAdapter() {
if (adapter == null) adapter = new TestRecAdapter(this);
recyclerView.verticalLayoutManager(this) //设置layoutManager
.setAdapter(adapter); //设置Adapter
adapter.setRecItemClick(new RecyclerItemCallback<TestRecAdapter.Item, TestRecAdapter.ViewHolder>() {
@Override
public void onItemClick(int position, TestRecAdapter.Item model, int tag, TestRecAdapter.ViewHolder holder) {
super.onItemClick(position, model, tag, holder);
switch (tag) {
case TestRecAdapter.TAG_CLICK:
//TODO 事件处理
break;
}
}
});
recyclerView.horizontalDivider(R.color.x_red, R.dimen.divider_height); //设置divider
recyclerView.setOnRefreshAndLoadMoreListener(new XRecyclerView.OnRefreshAndLoadMoreListener() { //设置刷新和上拉加载监听
@Override
public void onRefresh() {
loadData(1);
}
@Override
public void onLoadMore(int page) {
loadData(page);
}
});
recyclerView.useDefLoadMoreView();
}
开发者ID:limedroid,项目名称:ARecyclerView,代码行数:32,代码来源:MainActivity.java
注:本文中的cn.droidlover.xrecyclerview.RecyclerItemCallback类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论