ShimmerLayout icon indicating copy to clipboard operation
ShimmerLayout copied to clipboard

Shimmer effect moving out from view sometimes

Open MenosGrante opened this issue 5 years ago • 7 comments

Sometimes shimmer effect moving out of views and after restart it is working good again.

Video example

<io.supercharge.shimmerlayout.ShimmerLayout
        android:id="@+id/statisticsLayoutLoading"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone"
        app:shimmer_angle="15"
        app:shimmer_color="@color/colorShimmerEffect">

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

            <View
                android:layout_width="match_parent"
                android:layout_height="48dp"
                android:layout_margin="16dp"
                android:background="@color/colorShimmerBackground" />

            <View
                android:layout_width="280dp"
                android:layout_height="280dp"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="16dp"
                android:layout_marginBottom="16dp"
                android:background="@drawable/figure_circle"
                android:backgroundTint="@color/colorShimmerBackground" />

            <View
                android:layout_width="match_parent"
                android:layout_height="48dp"
                android:layout_margin="16dp"
                android:background="@color/colorShimmerBackground" />

            <View
                android:layout_width="280dp"
                android:layout_height="280dp"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="16dp"
                android:layout_marginBottom="16dp"
                android:background="@drawable/figure_circle"
                android:backgroundTint="@color/colorShimmerBackground" />

            <View
                android:layout_width="match_parent"
                android:layout_height="48dp"
                android:layout_margin="16dp"
                android:background="@color/colorShimmerBackground" />

            <View
                android:layout_width="280dp"
                android:layout_height="280dp"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="16dp"
                android:layout_marginBottom="16dp"
                android:background="@drawable/figure_circle"
                android:backgroundTint="@color/colorShimmerBackground" />
        </LinearLayout>
    </io.supercharge.shimmerlayout.ShimmerLayout>

MenosGrante avatar Nov 12 '18 11:11 MenosGrante

@MenosGrante thanks for reporting the, I will investigate it.

veghtomi avatar Nov 14 '18 08:11 veghtomi

@veghtomi No problem, hope you will fix this soon :)

MenosGrante avatar Nov 14 '18 09:11 MenosGrante

@veghtomi did you find the cause of this issue because I'm having it too on my app

DanP1925 avatar Jun 13 '19 20:06 DanP1925

Any updates on this?

Sdghasemi avatar Jul 08 '19 10:07 Sdghasemi

Same issue here. Any updates @veghtomi ?

nikhilpanju avatar Jul 10 '19 07:07 nikhilpanju

I am also seeing this behaviour, and I notice that this happens with phones running Android 9. I see that 2-3 out of 10 cycles go beyond the bounds on Samsung S9. Issue does not happen on Huawei P9 Lite (Android 7.0) or Samsung Tab S2 (Android 7.0)

Do you have any updates regarding this @veghtomi ?

atakankaya avatar Sep 06 '19 13:09 atakankaya

private void enableForcedSoftwareLayerIfNeeded() {

// if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN) { setLayerType(View.LAYER_TYPE_SOFTWARE, null); // } } can ignore this problem

fenghuilu avatar Aug 04 '22 03:08 fenghuilu