AChep/literaryclock

View on GitHub
app/src/main/res/xml/desc_fragment_common.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <Transition
        app:constraintSetEnd="@id/collapsed"
        app:constraintSetStart="@id/expanded"
        app:motionInterpolator="easeInOut">

        <OnSwipe
            app:dragDirection="dragUp"
            app:touchAnchorId="@id/toolbarBg"
            app:touchAnchorSide="bottom" />

    </Transition>

    <ConstraintSet android:id="@+id/expanded">
        <Constraint
            android:id="@id/titleTextView"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="56dp"
            app:layout_constraintBottom_toBottomOf="@id/toolbarBg"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@id/toolbarBg" />
        <Constraint
            android:id="@id/barrier"
            android:layout_height="@dimen/app_bar_height__expanded"
            app:layout_constraintTop_toBottomOf="@id/statusBarBg" />
    </ConstraintSet>

    <ConstraintSet android:id="@+id/collapsed">
        <Constraint
            android:id="@id/titleTextView"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:scaleX="0.6"
            android:scaleY="0.6"
            app:layout_constraintBottom_toBottomOf="@id/barrier"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@id/barrier" />
        <!--
            Stop at the size of a usual
            action bar.
            -->
        <Constraint
            android:id="@id/barrier"
            android:layout_height="@dimen/app_bar_height__collapsed"
            app:layout_constraintTop_toBottomOf="@id/statusBarBg" />
    </ConstraintSet>

</MotionScene>