Skip to content

Shadow mispacement on rotation #18

Description

@BurningAXE

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! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions