129 | * Try to save memory produced by shimmer layouts.
130 | *
131 | * @param count input number.
132 | * @return valid count number.
133 | */
134 | private int validateCount(int count) {
135 | return count < 20 ? count : 20;
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_example.xml:
--------------------------------------------------------------------------------
1 |
19 |
|
|
|
17 |
18 | ## Download
19 |
20 | To include `ShimmerRecyclerView` in your project, add the following to your dependencies:
21 |
22 | **app/build.gradle**
23 | ```groovy
24 | dependencies {
25 | implementation 'com.facebook.shimmer:shimmer:0.5.0'
26 | implementation 'com.todkars:shimmer-recyclerview:0.4.1'
27 | }
28 | ```
29 |
30 | ## Usage
31 | The following snippet shows how you can use Shimmer RecyclerView in your project.
32 |
33 | **Layout**
34 |
35 | ```xml
36 |