Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
220 views
in Technique[技术] by (71.8m points)

Horizontal RecyclerView with nice animation Android

How to make such like horizontal recycle view with nice UI animation. Note: I can make horizontal recyclerview. but how can it start from middle and when scroll it comes in start? and secondly background image will be visible or invisible animatedly according scrolling.

enter image description here

I want to make such like I already try ItemDecoration but when it load fast time start from left after if start from center any help.

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Set padding left on Recyclerview as below code to start your recyclerView row as per padding left :

enter image description here enter image description here

your Xml code should be like this :

<LinearLayout
           android:layout_marginTop="8dp"
           android:background="@drawable/banner2"
           android:layout_width="match_parent"
           android:layout_height="240dp">



           <android.support.v7.widget.RecyclerView
               android:paddingLeft="180dp"
               android:layout_marginTop="17dp"
               android:id="@+id/recycler_kids"
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:clipToPadding="false"
               app:layout_behavior="@string/appbar_scrolling_view_behavior" />


       </LinearLayout>

Look into this for detect hiding row on recyclerview to show background image Hiding views in RecyclerView


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...