RecyclerViewCardGallery
介绍:
RecyclerView实现Card Gallery效果,替代ViewPager方案。
运行效果:
使用说明:
调用new PageScaleHelper().attachToRecyclerView(mRecyclerView);扩展RecyclerView
final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
mRecyclerView.setLayoutManager(linearLayoutManager);
mRecyclerView.setAdapter(new CardAdapter());
// mRecyclerView绑定scale效果
new CardScaleHelper().attachToRecyclerView(mRecyclerView);
在adapter相应的位置调用
mCardAdapterHelper.onCreateViewHolder(parent, itemView);
mCardAdapterHelper.onBindViewHolder(holder.itemView, position, getItemCount());
Reference
Apk download
已下载
0