I have created calendar by using recycle view. It worked perfectly in emulator but in real device only few elements gets loaded.
I used horizontal scrollview so all elements load at once and I'm adding padding at both sides for animations.
Code Snippet:
<HorizontalScrollView
android:id="@+id/dateHSV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
android:scrollbars="none">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/dateRV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:listitem="@layout/rv_item_calender" />
</HorizontalScrollView>
In Mobile
In Emulator (android 6)
As You can see in mobile only 3 dates gets loaded while in emulator (android 6) all dates gets loaded.