Specify an item in the list of holders, such as facebook to download content.

I want to display an item list item when loading content, for example: Faceook. How can i achieve this? enter image description here

+8
android android-recyclerview
source share
4 answers

There is no library for Android for this, as far as I know, I could write one, but I'm lazy :)

So now I just use this nice convergence effect from facebook through a simple view with a gray background.

<com.facebook.shimmer.ShimmerFrameLayout android:id="@+id/shimmer_view_container" android:layout_width="match_parent" android:layout_height="wrap_content"> <View android:id="@+id/gallery_placeholder" android:layout_width="200dp" android:layout_height="200dp" android:layout_gravity="center" android:layout_margin="5dp" android:background="@android:color/darker_gray" /> </com.facebook.shimmer.ShimmerFrameLayout> 

This works for me ...

+3
source share

Now there is a new library called ShimmerRecyclerview , which is based on Facebook Shimmer

To use it, you define your recyclerview xml as follows:

 <com.cooltechworks.views.shimmer.ShimmerRecyclerView xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/shimmer_recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" app:demo_child_count="10" app:demo_grid_child_count="2" app:demo_layout="@layout/layout_demo_grid" app:demo_layout_manager_type="grid" /> 
Attribute

demo_layout is the location of the template.

To show a flickering layout, call:

 shimmerRecycler.showShimmerAdapter(); 

And to hide it:

 shimmerRecycler.hideShimmerAdapter(); 
+1
source share

Please, try

https://android-arsenal.com/details/1/5890

You can customize your shimmer element for recyclerview.

0
source share

you can use skeleton esay.

see the link for an example project.

see link for apk project.

enter image description here

0
source share

All Articles