Fixes #1204 - Fixes the home screen animation
parent
3654289c8a
commit
9434f01b42
|
@ -153,6 +153,9 @@ class HomeFragment : Fragment(), CoroutineScope {
|
|||
BrowsingModeManager.Mode.Private -> BrowsingModeManager.Mode.Normal
|
||||
}
|
||||
}
|
||||
|
||||
// We need the shadow to be above the components.
|
||||
homeDividerShadow.bringToFront()
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="@color/home_header_shadow"
|
||||
android:endColor="@android:color/transparent"
|
||||
android:angle="270" />
|
||||
</shape>
|
|
@ -89,5 +89,15 @@
|
|||
android:layout_marginStart="40dp"
|
||||
android:layout_marginEnd="40dp"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/homeDividerShadow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="3dp"
|
||||
android:alpha="0"
|
||||
android:background="@drawable/home_header_shadow"
|
||||
app:layout_constraintTop_toBottomOf="@id/homeDivider"
|
||||
app:layout_constraintStart_toStartOf="@+id/homeDivider"
|
||||
app:layout_constraintEnd_toEndOf="@+id/homeDivider" />
|
||||
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -140,4 +140,6 @@
|
|||
<color name="quick_action_background_private_theme">@color/toolbar_dark_mode</color>
|
||||
|
||||
<color name="fenix_snackbar_background">#232749</color>
|
||||
|
||||
<color name="home_header_shadow">#1F1B215E</color>
|
||||
</resources>
|
||||
|
|
|
@ -50,6 +50,21 @@
|
|||
motion:framePosition="90"
|
||||
android:alpha="0" />
|
||||
|
||||
<KeyAttribute
|
||||
motion:motionTarget="@id/homeDividerShadow"
|
||||
motion:framePosition="90">
|
||||
<CustomAttribute
|
||||
motion:attributeName="layoutMarginStart"
|
||||
motion:customPixelDimension="0dp" />
|
||||
<CustomAttribute
|
||||
motion:attributeName="layoutMarginEnd"
|
||||
motion:customPixelDimension="0dp" />
|
||||
</KeyAttribute>
|
||||
<KeyAttribute
|
||||
motion:motionTarget="@id/homeDividerShadow"
|
||||
motion:framePosition="90"
|
||||
android:alpha="0" />
|
||||
|
||||
<KeyAttribute
|
||||
motion:motionTarget="@id/toolbar_wrapper"
|
||||
motion:framePosition="0"
|
||||
|
@ -120,5 +135,23 @@
|
|||
android:layout_width="@dimen/glyph_button_height"
|
||||
motion:layout_constraintEnd_toStartOf="@id/menuButton"
|
||||
motion:layout_constraintTop_toTopOf="@id/menuButton"/>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/homeDivider"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
motion:layout_constraintTop_toBottomOf="@id/toolbar_wrapper"
|
||||
motion:layout_constraintStart_toStartOf="parent"
|
||||
motion:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/homeDividerShadow"
|
||||
android:layout_height="3dp"
|
||||
android:alpha="1"
|
||||
motion:layout_constraintTop_toBottomOf="@id/homeDivider"
|
||||
motion:layout_constraintStart_toStartOf="@+id/homeDivider"
|
||||
motion:layout_constraintEnd_toEndOf="@+id/homeDivider" />
|
||||
</ConstraintSet>
|
||||
</MotionScene>
|
||||
|
|
Loading…
Reference in New Issue