AGSkeletonLoading
AGSkeletonLoading copied to clipboard
Using SkeletonRecyclerView make view holder item to be flattened
I am using SkeletonRecyclerView for making a shimmering effect to recycler view items and using a card view to be the root element of my view holder item layout. when using the SkeletonRecyclerView cause my view holder item to be flattened although I set the card elevation attribute. what may cause this issue?
here are snippets:
<aglibs.loading.skeleton.layout.SkeletonRecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:enableDevelopPreview="true"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:skeletonViewHolderAmount="10"
app:skeletonViewHolderItem="@layout/item_ediet_center_layout"
app:skeletonViewHolderTruncate="true"
tools:itemCount="2"
tools:listitem="@layout/item_ediet_center_layout" />
and for view holder item layout
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="@android:color/white"
app:cardCornerRadius="@dimen/_10dp"
app:cardElevation="@dimen/_4dp"
app:cardUseCompatPadding="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/_8dp">
<ImageView
... />
<TextView
... />
<TextView
... />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>