一个用RecyclerView实现的画廊效果,被选中item居中放大,效果很自然。

一个用RecyclerView实现的画廊效果,被选中item居中放大,效果很自然。
HuaLang

使用

  1. xml中添加DiscreteScrollView
<com.example.administrator.hualangrecyclerview.discretescrollview.DiscreteScrollView
        android:id="@+id/item_picker"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
  1. 设置adapter
DiscreteScrollView scrollView = findViewById(R.id.picker);
scrollView.setAdapter(new YourAdapterImplementation());

demo下载http://download.csdn.net/detail/qq_35549248/9848709

发布了47 篇原创文章 · 获赞 55 · 访问量 4万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章