Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

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

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...