ShimmerRecyclerView
ShimmerRecyclerView copied to clipboard
Shimmer is Not Showing in Some Fragments
Hello Dear, This is really good Library and I am using this in my project. Well I am facing a weired problem I dont know why But I have spent more than 3 hours to figure out this but vain. The thing is shimmer not showing in some fragments
`
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:elevation="@dimen/dp0"
android:paddingBottom="@dimen/dp7"
android:background="@color/white">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white"
app:contentInsetStartWithNavigation="0dp"
app:layout_scrollFlags="scroll|enterAlways" />
<EditText
android:layout_width="match_parent"
android:layout_height="@dimen/dp50"
android:drawableStart="@drawable/ic_search"
android:background="@drawable/search_background"
android:drawablePadding="@dimen/dp15"
android:paddingStart="@dimen/dp15"
android:hint="Search"
android:layout_marginEnd="@dimen/dp15"
android:layout_marginStart="@dimen/dp15"
android:clickable="true"
android:focusable="false"
android:layout_marginTop="@dimen/dp7"
android:fontFamily="@font/nunitosans_regular"/>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:scrollbars="none"
android:scrollingCache="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/mainDiv"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/searchByBodyTypeContainer"
android:background="@color/white"/>
<com.cooltechworks.views.shimmer.ShimmerRecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/allSearchResultRecyclerView"
android:paddingBottom="@dimen/dp6"
android:clipToPadding="false"
app:shimmer_demo_child_count="10"
app:shimmer_demo_layout_manager_type="linear_vertical"
app:shimmer_demo_layout="@layout/shimmer_car_list"
app:shimmer_demo_shimmer_color="#21ffffff"/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<!--bottom sheet container-->
<FrameLayout
android:id="@+id/bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>`
And shimmer_car_list is here Bellow
`
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="@dimen/dp140"
style="@style/SearchResult"
android:id="@+id/imageCard"
app:cardCornerRadius="@dimen/dp8"
android:layout_margin="@dimen/dp6"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
</com.google.android.material.card.MaterialCardView>`
How I am calling it is here bellow
binding.allSearchResultRecyclerView.showShimmerAdapter();
Shimmer not showing :(
Do you find solution for this issue ??