summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatherine Liang <cathliang@google.com>2023-12-12 21:58:28 +0000
committerCatherine Liang <cathliang@google.com>2023-12-12 22:02:52 +0000
commit92951bb497044253c1dddc0328cd86b8dffb1759 (patch)
treed85781ec13a1577029c840b5b749422859a45cd5
parent5edeb5270d7e3e97c336d94b4827c865f69b0f34 (diff)
downloadWallpaperPicker2-92951bb497044253c1dddc0328cd86b8dffb1759.tar.gz
Turn off WIP small to full preview transition animation
Turn off work in progress shared element animation. Also set background of full screen fragment toolbar to be transparent to remove the flash in and out of a toolbar background color when the new fragment enters without custom transition. Flag: ACONFIG com.android.wallpaper.multi_crop_preview_ui_flag DEVELOPMENT Bug: 303318205 Test: manually verified Change-Id: I7b8754ca561e16ce4ccc9337bdca469c2f548fa9
-rw-r--r--res/layout/fragment_full_preview.xml1
-rw-r--r--src/com/android/wallpaper/picker/preview/ui/fragment/FullPreviewFragment.kt10
2 files changed, 9 insertions, 2 deletions
diff --git a/res/layout/fragment_full_preview.xml b/res/layout/fragment_full_preview.xml
index 88983d0d..ea503861 100644
--- a/res/layout/fragment_full_preview.xml
+++ b/res/layout/fragment_full_preview.xml
@@ -32,6 +32,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:background="@android:color/transparent"
android:fitsSystemWindows="true">
<include
android:id="@+id/toolbar_container"
diff --git a/src/com/android/wallpaper/picker/preview/ui/fragment/FullPreviewFragment.kt b/src/com/android/wallpaper/picker/preview/ui/fragment/FullPreviewFragment.kt
index 9c77da1e..0020a443 100644
--- a/src/com/android/wallpaper/picker/preview/ui/fragment/FullPreviewFragment.kt
+++ b/src/com/android/wallpaper/picker/preview/ui/fragment/FullPreviewFragment.kt
@@ -51,8 +51,10 @@ class FullPreviewFragment : Hilt_FullPreviewFragment() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- sharedElementEnterTransition =
- TransitionInflater.from(appContext).inflateTransition(R.transition.shared_view)
+ if (ENABLE_ANIMATION) {
+ sharedElementEnterTransition =
+ TransitionInflater.from(appContext).inflateTransition(R.transition.shared_view)
+ }
}
override fun onCreateView(
@@ -104,4 +106,8 @@ class FullPreviewFragment : Hilt_FullPreviewFragment() {
override fun getToolbarTextColor(): Int {
return ContextCompat.getColor(requireContext(), R.color.system_on_surface)
}
+
+ companion object {
+ const val ENABLE_ANIMATION = false
+ }
}