一個用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萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章