From b7feaf44df830274768dabd23498ce8dd1221607 Mon Sep 17 00:00:00 2001 From: Jarne Demeulemeester Date: Wed, 16 Jun 2021 12:11:08 +0200 Subject: [PATCH] Add animation to overview media --- app/src/main/res/anim/item_animation_slide_in.xml | 12 ++++++++++++ app/src/main/res/anim/overview_media_animation.xml | 5 +++++ app/src/main/res/layout/fragment_home.xml | 12 ++++++------ app/src/main/res/layout/fragment_media.xml | 5 +++-- app/src/main/res/layout/view_item.xml | 7 +++++-- app/src/main/res/values-sw600dp/dimens.xml | 1 + app/src/main/res/values/dimens.xml | 1 + 7 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 app/src/main/res/anim/item_animation_slide_in.xml create mode 100644 app/src/main/res/anim/overview_media_animation.xml diff --git a/app/src/main/res/anim/item_animation_slide_in.xml b/app/src/main/res/anim/item_animation_slide_in.xml new file mode 100644 index 00000000..c035240c --- /dev/null +++ b/app/src/main/res/anim/item_animation_slide_in.xml @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/anim/overview_media_animation.xml b/app/src/main/res/anim/overview_media_animation.xml new file mode 100644 index 00000000..d197e7e7 --- /dev/null +++ b/app/src/main/res/anim/overview_media_animation.xml @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index 379e070a..d86a5247 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -19,16 +19,16 @@ android:id="@+id/loading_incicator" android:layout_width="wrap_content" android:layout_height="wrap_content" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toTopOf="parent" + android:indeterminate="true" app:layout_constraintBottom_toBottomOf="parent" - app:trackCornerRadius="10dp" - android:indeterminate="true"/> + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:trackCornerRadius="10dp" /> + tools:context=".fragments.MediaFragment" + android:animateLayoutChanges="true"> diff --git a/app/src/main/res/values-sw600dp/dimens.xml b/app/src/main/res/values-sw600dp/dimens.xml index 4baf068c..c82832d0 100644 --- a/app/src/main/res/values-sw600dp/dimens.xml +++ b/app/src/main/res/values-sw600dp/dimens.xml @@ -3,4 +3,5 @@ 400dp 6 3 + 450 \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index bc6448a9..22b2ee01 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -5,4 +5,5 @@ @dimen/match_parent 3 1 + 250 \ No newline at end of file