From 94fd8be266168952e2c6e85ae8bf89c1b4afdcba Mon Sep 17 00:00:00 2001 From: Tanish Moral <134790673+TanishMoral11@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:06:17 +0530 Subject: [PATCH] Fix #2652 : Improve splash screen implementation with new drawable and updated styles (#5559) Fixes #2652: This PR aims to enhance the splash screen implementation by making the following changes: - **splash_image.xml**: Created a new layer-list drawable that includes a background color (`@color/oppiaPrimaryLight`) and centers the splash image (`@drawable/splash_page`). - **splash_page.xml**: Modified the path data for the splash image and removed the old clip-path to ensure proper rendering. - **styles.xml**: Updated the `SplashScreenTheme` to reference the new `splash_image` drawable and set `adjustViewBounds` to true, allowing for better handling of different screen sizes. These changes are intended to improve the visual consistency and responsiveness of the splash screen across various devices. ## Essential Checklist - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ..."). - [x] Any changes to `scripts/assets` files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). Before : https://github.com/user-attachments/assets/161eb1ca-57b1-4b63-829a-de41f1b99702 After : https://github.com/user-attachments/assets/fcd480ff-aabd-4fe3-9887-b9bf50b276ac --------- Co-authored-by: Adhiambo Peres <59600948+adhiamboperes@users.noreply.github.com> --- app/src/main/res/drawable/splash_image.xml | 5 +++++ app/src/main/res/drawable/splash_page.xml | 6 ------ app/src/main/res/values/styles.xml | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 app/src/main/res/drawable/splash_image.xml diff --git a/app/src/main/res/drawable/splash_image.xml b/app/src/main/res/drawable/splash_image.xml new file mode 100644 index 00000000000..d71dfdee03e --- /dev/null +++ b/app/src/main/res/drawable/splash_image.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/drawable/splash_page.xml b/app/src/main/res/drawable/splash_page.xml index 96790799d5d..a95dba7e5eb 100644 --- a/app/src/main/res/drawable/splash_page.xml +++ b/app/src/main/res/drawable/splash_page.xml @@ -3,12 +3,6 @@ android:height="640dp" android:viewportWidth="360" android:viewportHeight="640"> - - - - diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 61eaea05390..32fcd43fce6 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -74,7 +74,8 @@