|
|
@ -3,81 +3,74 @@
|
|
|
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
|
<MotionScene
|
|
|
|
<MotionScene
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
xmlns:motion="http://schemas.android.com/apk/res-auto">
|
|
|
|
xmlns:motion="http://schemas.android.com/apk/res-auto">
|
|
|
|
|
|
|
|
|
|
|
|
<Transition
|
|
|
|
<Transition
|
|
|
|
motion:constraintSetStart="@+id/start"
|
|
|
|
motion:constraintSetStart="@+id/start"
|
|
|
|
motion:constraintSetEnd="@+id/end">
|
|
|
|
motion:constraintSetEnd="@+id/end">
|
|
|
|
<OnSwipe
|
|
|
|
<OnSwipe
|
|
|
|
motion:dragDirection="dragUp"
|
|
|
|
motion:dragDirection="dragUp"
|
|
|
|
motion:touchAnchorId="@id/homeScrollView"
|
|
|
|
motion:touchAnchorId="@id/homeScrollView"
|
|
|
|
motion:touchAnchorSide="top" />
|
|
|
|
motion:touchAnchorSide="top" />
|
|
|
|
|
|
|
|
|
|
|
|
<KeyFrameSet>
|
|
|
|
<KeyFrameSet>
|
|
|
|
<KeyPosition
|
|
|
|
<KeyPosition
|
|
|
|
|
|
|
|
motion:motionTarget="@id/wordmark"
|
|
|
|
motion:keyPositionType="pathRelative"
|
|
|
|
motion:keyPositionType="pathRelative"
|
|
|
|
motion:framePosition="50"
|
|
|
|
motion:framePosition="50"
|
|
|
|
motion:target="@id/wordmark"
|
|
|
|
|
|
|
|
motion:percentX="0.9" />
|
|
|
|
motion:percentX="0.9" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<KeyAttribute
|
|
|
|
<KeyAttribute
|
|
|
|
motion:target="@id/wordmark"
|
|
|
|
motion:motionTarget="@id/wordmark"
|
|
|
|
motion:framePosition="50"
|
|
|
|
motion:framePosition="50"
|
|
|
|
|
|
|
|
android:translationY="0dp"
|
|
|
|
android:alpha="1" />
|
|
|
|
android:alpha="1" />
|
|
|
|
<KeyAttribute
|
|
|
|
<KeyAttribute
|
|
|
|
motion:target="@id/wordmark"
|
|
|
|
motion:motionTarget="@id/wordmark"
|
|
|
|
motion:framePosition="90"
|
|
|
|
motion:framePosition="90"
|
|
|
|
android:alpha="0" />
|
|
|
|
android:alpha="0" />
|
|
|
|
|
|
|
|
|
|
|
|
<KeyAttribute
|
|
|
|
<KeyAttribute
|
|
|
|
motion:target="@id/menuButton"
|
|
|
|
motion:motionTarget="@id/menuButton"
|
|
|
|
motion:framePosition="50"
|
|
|
|
motion:framePosition="50"
|
|
|
|
|
|
|
|
android:translationY="0dp"
|
|
|
|
android:alpha="1" />
|
|
|
|
android:alpha="1" />
|
|
|
|
<KeyAttribute
|
|
|
|
<KeyAttribute
|
|
|
|
motion:target="@id/menuButton"
|
|
|
|
motion:motionTarget="@id/menuButton"
|
|
|
|
motion:framePosition="90"
|
|
|
|
motion:framePosition="90"
|
|
|
|
android:alpha="0" />
|
|
|
|
android:alpha="0" />
|
|
|
|
<KeyAttribute
|
|
|
|
<KeyAttribute
|
|
|
|
motion:target="@id/privateBrowsingButton"
|
|
|
|
motion:motionTarget="@id/privateBrowsingButton"
|
|
|
|
motion:framePosition="50"
|
|
|
|
motion:framePosition="50"
|
|
|
|
|
|
|
|
android:translationY="0dp"
|
|
|
|
android:alpha="1" />
|
|
|
|
android:alpha="1" />
|
|
|
|
<KeyAttribute
|
|
|
|
<KeyAttribute
|
|
|
|
motion:target="@id/privateBrowsingButton"
|
|
|
|
motion:motionTarget="@id/privateBrowsingButton"
|
|
|
|
motion:framePosition="90"
|
|
|
|
motion:framePosition="90"
|
|
|
|
android:alpha="0" />
|
|
|
|
android:alpha="0" />
|
|
|
|
|
|
|
|
|
|
|
|
<KeyAttribute
|
|
|
|
<KeyAttribute
|
|
|
|
motion:target="@id/toolbar_wrapper"
|
|
|
|
motion:motionTarget="@id/toolbar_wrapper"
|
|
|
|
motion:framePosition="0"
|
|
|
|
motion:framePosition="0"
|
|
|
|
android:elevation="@dimen/toolbar_elevation" />
|
|
|
|
android:elevation="@dimen/toolbar_elevation" />
|
|
|
|
|
|
|
|
|
|
|
|
<KeyAttribute
|
|
|
|
<KeyAttribute
|
|
|
|
motion:target="@id/toolbar_wrapper"
|
|
|
|
motion:motionTarget="@id/toolbar_wrapper"
|
|
|
|
motion:framePosition="50"
|
|
|
|
motion:framePosition="50"
|
|
|
|
android:elevation="0dp" />
|
|
|
|
android:elevation="0dp" />
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
|
|
|
https://github.com/mozilla-mobile/fenix/issues/362
|
|
|
|
|
|
|
|
There is currently an issue with visibility changes in ConstraintLayout 2.0.0-alpha3
|
|
|
|
|
|
|
|
https://issuetracker.google.com/issues/122090772
|
|
|
|
|
|
|
|
For now we're going to manually implement KeyTriggers.
|
|
|
|
|
|
|
|
<KeyTrigger
|
|
|
|
<KeyTrigger
|
|
|
|
motion:target="@id/toolbar_wrapper"
|
|
|
|
motion:motionTarget="@id/toolbar_wrapper"
|
|
|
|
motion:framePosition="55"
|
|
|
|
motion:framePosition="55"
|
|
|
|
motion:onPositiveCross="transitionToDark"
|
|
|
|
motion:onPositiveCross="transitionToDark"
|
|
|
|
motion:onNegativeCross="transitionToLight"
|
|
|
|
motion:onNegativeCross="transitionToLight" />
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<KeyTrigger
|
|
|
|
<KeyTrigger
|
|
|
|
motion:target="@id/toolbar_wrapper"
|
|
|
|
motion:motionTarget="@id/toolbar_wrapper"
|
|
|
|
motion:framePosition="90"
|
|
|
|
motion:framePosition="90"
|
|
|
|
motion:onPositiveCross="transitionToDarkNoBorder"
|
|
|
|
motion:onPositiveCross="transitionToDarkNoBorder"
|
|
|
|
motion:onNegativeCross="transitionToDarkFromNoBorder"
|
|
|
|
motion:onNegativeCross="transitionToDarkFromNoBorder" />
|
|
|
|
/>
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</KeyFrameSet>
|
|
|
|
</KeyFrameSet>
|
|
|
|
</Transition>
|
|
|
|
</Transition>
|
|
|
|
|
|
|
|
|
|
|
@ -86,14 +79,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
<ConstraintSet android:id="@+id/end">
|
|
|
|
<ConstraintSet android:id="@+id/end">
|
|
|
|
<Constraint
|
|
|
|
<Constraint
|
|
|
|
android:id="@+id/wordmark"
|
|
|
|
android:id="@+id/wordmark"
|
|
|
|
android:layout_marginStart="16dp"
|
|
|
|
android:layout_marginStart="16dp"
|
|
|
|
android:layout_marginTop="12dp"
|
|
|
|
android:layout_marginTop="16dp"
|
|
|
|
android:alpha="0"
|
|
|
|
android:alpha="0"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
motion:layout_constraintStart_toStartOf="parent"
|
|
|
|
android:translationY="-10dp"
|
|
|
|
motion:layout_constraintTop_toTopOf="parent" />
|
|
|
|
motion:layout_constraintStart_toStartOf="parent"
|
|
|
|
|
|
|
|
motion:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
|
|
|
|
|
|
<Constraint
|
|
|
|
<Constraint
|
|
|
|
android:id="@+id/toolbar_wrapper"
|
|
|
|
android:id="@+id/toolbar_wrapper"
|
|
|
@ -105,12 +99,13 @@
|
|
|
|
motion:layout_constraintTop_toTopOf="parent"
|
|
|
|
motion:layout_constraintTop_toTopOf="parent"
|
|
|
|
motion:layout_constraintStart_toStartOf="parent"
|
|
|
|
motion:layout_constraintStart_toStartOf="parent"
|
|
|
|
motion:layout_constraintEnd_toEndOf="parent"
|
|
|
|
motion:layout_constraintEnd_toEndOf="parent"
|
|
|
|
android:elevation="0dp"/>
|
|
|
|
android:elevation="0dp" />
|
|
|
|
|
|
|
|
|
|
|
|
<Constraint
|
|
|
|
<Constraint
|
|
|
|
android:id="@+id/menuButton"
|
|
|
|
android:id="@+id/menuButton"
|
|
|
|
android:alpha="0"
|
|
|
|
android:alpha="0"
|
|
|
|
android:layout_marginTop="16dp"
|
|
|
|
android:layout_marginTop="16dp"
|
|
|
|
|
|
|
|
android:translationY="-10dp"
|
|
|
|
android:layout_height="@dimen/glyph_button_height"
|
|
|
|
android:layout_height="@dimen/glyph_button_height"
|
|
|
|
android:layout_width="@dimen/glyph_button_height"
|
|
|
|
android:layout_width="@dimen/glyph_button_height"
|
|
|
|
motion:layout_constraintEnd_toEndOf="parent"
|
|
|
|
motion:layout_constraintEnd_toEndOf="parent"
|
|
|
@ -119,11 +114,10 @@
|
|
|
|
<Constraint
|
|
|
|
<Constraint
|
|
|
|
android:id="@+id/privateBrowsingButton"
|
|
|
|
android:id="@+id/privateBrowsingButton"
|
|
|
|
android:alpha="0"
|
|
|
|
android:alpha="0"
|
|
|
|
|
|
|
|
android:translationY="-10dp"
|
|
|
|
android:layout_height="@dimen/glyph_button_height"
|
|
|
|
android:layout_height="@dimen/glyph_button_height"
|
|
|
|
android:layout_width="@dimen/glyph_button_height"
|
|
|
|
android:layout_width="@dimen/glyph_button_height"
|
|
|
|
motion:layout_constraintEnd_toStartOf="@id/menuButton"
|
|
|
|
motion:layout_constraintEnd_toStartOf="@id/menuButton"
|
|
|
|
motion:layout_constraintTop_toTopOf="@id/menuButton"/>
|
|
|
|
motion:layout_constraintTop_toTopOf="@id/menuButton"/>
|
|
|
|
|
|
|
|
|
|
|
|
</ConstraintSet>
|
|
|
|
</ConstraintSet>
|
|
|
|
|
|
|
|
</MotionScene>
|
|
|
|
</MotionScene>
|
|
|
|
|
|
|
|