android - How to make recycler view start adding items from center? -
- i have recyclerview "horziontal linear layout" layout manager.
- recycler view in frame layout, layout_gravity = "center", , layout_width="wrap_content"
- i want recycler view start adding items center.
- here want:
- and here getting:
- you can see in last image items added left. want add items center shown in first 3 images .
i had same issue , solved horizontal recyclerview:
<android.support.v7.widget.recyclerview android:id="@+id/recyclerview" android:layout_width="wrap_content" android:layout_height="68dp" android:layout_centerhorizontal="true" android:orientation="horizontal" app:layoutmanager="android.support.v7.widget.linearlayoutmanager" />
here main part android:layout_centerhorizontal="true" , layout_width="wrap_content"
Comments
Post a Comment