Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadow mispacement on rotation #18

Open
BurningAXE opened this issue Dec 12, 2017 · 0 comments
Open

Shadow mispacement on rotation #18

BurningAXE opened this issue Dec 12, 2017 · 0 comments

Comments

@BurningAXE
Copy link

BurningAXE commented Dec 12, 2017

I'm noticing a weird effect when the device is rotated:
screenshot_1513062572
screenshot_1513062577

Looks like the shadow is calculated only once when the view is inflated and then reapplied size and orientation changes.

`

<ScrollView
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:layout_centerInParent="true"
    android:scrollbarThumbVertical="@color/alpha_white"
    android:scrollbarSize="3dp">

    <LinearLayout
        android:id="@+id/login_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:orientation="vertical"
        android:padding="8dp" >

        <com.gigamole.library.ShadowLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:sl_shadowed="true"
            app:sl_shadow_angle="90"
            app:sl_shadow_radius="2dp"
            app:sl_shadow_distance="1dp"
            app:sl_shadow_color="@android:color/black">

            <ImageView
                android:id="@+id/logo"
                android:layout_width="wrap_content"
                android:layout_height="200dp"
                android:paddingTop="0dp"
                android:paddingBottom="12dp"
                android:paddingStart="48dp"
                android:paddingEnd="48dp"
                android:layout_gravity="top"
                android:contentDescription="@string/cont_descr_app_logo"
                android:src="@drawable/logo_white"/>

        </com.gigamole.library.ShadowLayout>

        ...

    </LinearLayout>
</ScrollView>

`

The initial orientation doesn't matter - it's OK until you rotate. Rotating back and forth produces the same screens.

P.S. Great library, btw! :)

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

No branches or pull requests

1 participant