Skip to content

Instantly share code, notes, and snippets.

@shubhamnikam
Created January 24, 2019 18:09
Show Gist options
  • Save shubhamnikam/a7b5b5e64332c87a7e1881d03a811faf to your computer and use it in GitHub Desktop.
Save shubhamnikam/a7b5b5e64332c87a7e1881d03a811faf to your computer and use it in GitHub Desktop.
shimmer activity_main
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:shimmer="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
tools:context=".MainActivity">
<com.facebook.shimmer.ShimmerFrameLayout
android:id="@+id/shimmer_view_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
shimmer:duration="800">
<!-- 3 rows added as a placeholders -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/book_list_placeholder" />
<include layout="@layout/book_list_placeholder" />
<include layout="@layout/book_list_placeholder" />
</LinearLayout>
</com.facebook.shimmer.ShimmerFrameLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"/>
</android.support.constraint.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment