facebookarchive / shimmer-android

An easy, flexible way to add a shimmering effect to any view in an Android app.
http://facebook.github.io/shimmer-android/
Other
5.32k stars 697 forks source link

ShimmerFrameLayout With Scrollview #62

Closed deshario closed 6 years ago

deshario commented 6 years ago

Hor to use ShimmerFrameLayout with scrollview properly ?

<com.facebook.shimmer.ShimmerFrameLayout android:id="@+id/shimmer_view" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center" android:orientation="vertical" shimmer:duration="1500">

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fillViewport="true">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <include layout="@layout/pholder_campaign" />
                <include layout="@layout/pholder_campaign" />
                <include layout="@layout/pholder_campaign" />

            </LinearLayout>

        </ScrollView>

    </com.facebook.shimmer.ShimmerFrameLayout>

code

But My View looks like this when i scroll : shimmer

xiphirx commented 6 years ago

You want to use the latest version of the library and you also want to wrap the individual items of your scroll view in the shimmer layout instead of the entire scroll view.