带有精美动画Android的卧式RecyclerView [英] Horizontal RecyclerView with nice animation Android
问题描述
如何使用精美的UI动画制作类似水平回收的视图. 注意:我可以制作卧式recyclerview.但是如何从中间开始滚动?其次,根据滚动,背景图像将在动画上可见或不可见.
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.
我想做个类似我已经尝试过ItemDecoration的事情,但是当它快速加载时,如果从中心开始有帮助,则从左边开始.
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.
推荐答案
按照以下代码在Recyclerview
上设置左侧填充以按照左侧的填充开始recyclerView
行:
Set padding left on Recyclerview
as below code to start your recyclerView
row as per padding left :
您的 Xml代码应如下所示:
<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>
查看此内容以检测recyclerview上的隐藏行以显示背景图像在RecyclerView中隐藏视图
Look into this for detect hiding row on recyclerview to show background image Hiding views in RecyclerView
这篇关于带有精美动画Android的卧式RecyclerView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!