本文整理汇总了Java中com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter.setMore方法的典型用法代码示例。如果您正苦于以下问题:Java RecyclerArrayAdapter.setMore方法的具体用法?Java RecyclerArrayAdapter.setMore怎么用?Java RecyclerArrayAdapter.setMore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter
的用法示例。
在下文中一共展示了RecyclerArrayAdapter.setMore方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doWithGirlAdapter
import com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter; //导入方法依赖的package包/类
/**
* 设置 RecyclerArrayAdapter 处理滑动到底部加载更多、点击图片跳转Activity等逻辑
*/
private void doWithGirlAdapter(final RecyclerArrayAdapter<GirlItem> adapter) {
mRecyclerView.setAdapterWithProgress(adapter);
adapter.setMore(R.layout.recycler_load_more, this);
adapter.setNoMore(R.layout.recycler_no_more);
adapter.setError(R.layout.recycler_load_error);
adapter.setOnItemClickListener(new RecyclerArrayAdapter.OnItemClickListener() {
@Override
public void onItemClick(int position) {
Intent intent = new Intent(getActivity(), GirlActivity.class);
intent.putExtra("desc",adapter.getItem(position).desc);
intent.putExtra("url",adapter.getItem(position).url);
startActivity(intent);
}
});
}
示例2: configAdapter
import com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter; //导入方法依赖的package包/类
/**
* 设置 RecyclerArrayAdapter 处理滑动到底部加载更多、点击图片跳转Activity等逻辑
*/
private void configAdapter(final RecyclerArrayAdapter<DailyStoryItem> adapter) {
mRecyclerView.setAdapterWithProgress(adapter);
adapter.setMore(R.layout.recycler_load_more, this);
adapter.setNoMore(R.layout.recycler_no_more);
adapter.setError(R.layout.recycler_load_error);
adapter.setOnItemClickListener(new RecyclerArrayAdapter.OnItemClickListener() {
@Override
public void onItemClick(int position) {
// handle the item click events
Intent intent = new Intent(getActivity(), ZhihuActivity.class);
intent.putExtra("story_id", adapter.getItem(position).id); //传递当前点击item的id
intent.putExtra("story_title", adapter.getItem(position).title);
intent.putExtra("story_image", adapter.getItem(position).images.get(0));
startActivity(intent);
}
});
}
示例3: configLatestAdapter
import com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter; //导入方法依赖的package包/类
/**
* 设置 RecyclerArrayAdapter 处理滑动到底部加载更多、点击图片跳转Activity等逻辑
*/
private void configLatestAdapter(final RecyclerArrayAdapter<DoubanItem> adapter) {
mRecyclerView.setAdapterWithProgress(adapter);
adapter.setMore(R.layout.recycler_load_more, this);
adapter.setNoMore(R.layout.recycler_no_more);
adapter.setError(R.layout.recycler_load_error);
adapter.setOnItemClickListener(new RecyclerArrayAdapter.OnItemClickListener() {
@Override
public void onItemClick(int position) {
// handle the item click events
Intent intent = new Intent(getActivity(), DoubanActivity.class);
intent.putExtra("douban_id", adapter.getItem(position).id); //传递当前点击item的id
intent.putExtra("douban_title", adapter.getItem(position).title);
intent.putExtra("douban_image", adapter.getItem(position).image);
intent.putExtra("douban_short_url", adapter.getItem(position).short_url);
startActivity(intent);
}
});
}