Set padding left on Recyclerview
as below code to start your recyclerView
row as per padding left :
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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…