Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Severe tearing in animations #20

Closed
ttjst opened this issue Aug 10, 2016 · 3 comments
Closed

Severe tearing in animations #20

ttjst opened this issue Aug 10, 2016 · 3 comments

Comments

@ttjst
Copy link

ttjst commented Aug 10, 2016

If the shimmer effect is applied to a view that is taller than it is wide in the travel direction of the shimmer a severe tearing effect can be seen.

To visualize this you can test the following layout in portrait & landscape:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:id="@+id/shimmer_test"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                  xmlns:app="http://schemas.android.com/apk/res-auto"
                  android:layout_width="match_parent"
                  android:layout_height="0dp"
                  android:layout_weight="2"
                  android:orientation="horizontal">

        <com.facebook.shimmer.ShimmerFrameLayout
            android:id="@+id/shimmer1"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            app:auto_start="true">

            <View
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="#fd9fe1"/>
        </com.facebook.shimmer.ShimmerFrameLayout>

        <com.facebook.shimmer.ShimmerFrameLayout
            android:id="@+id/shimmer2"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            app:auto_start="true"
            app:angle="cw_90">

            <View
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="#D0B3CC"/>
        </com.facebook.shimmer.ShimmerFrameLayout>
    </LinearLayout>

    <View
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"/>
</LinearLayout>

basically, it will look like this:
Severe tearing

@hussi1
Copy link

hussi1 commented Jan 3, 2017

Any updates on this issue yet @ttjst

@debu-rnpr
Copy link

commenting out this line of code canvas.rotate(mMask.tilt, width / 2, height / 2); solves the problem for me

@xiphirx
Copy link
Contributor

xiphirx commented Mar 11, 2018

This has been resolved in the rewrite that I will plan on release in the coming weeks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants