From 622a0b5987c93fe5974ba7a851672ef92ad2f541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joris=20Pelgr=C3=B6m?= Date: Fri, 27 Dec 2024 18:34:42 +0100 Subject: [PATCH] Update splash screen icon to match style/size of frontend (#4937) - Use the same style and size of icon on the splash screen as the frontend to make the transition smoother - Also update onboarding screen with the same icon - Don't set splash screen icon as placeholder in camera/media player widgets as they are not visible anyway --- .../android/onboarding/welcome/WelcomeView.kt | 6 +++--- .../android/widgets/camera/CameraWidget.kt | 4 ---- .../mediaplayer/MediaPlayerControlsWidget.kt | 4 ---- .../drawable-v26/launch_screen_background.xml | 6 +++--- .../drawable-v31/app_icon_launch_screen.xml | 13 ++++++++++++ app/src/main/res/drawable/app_icon_launch.xml | 12 +++++++++++ app/src/main/res/drawable/app_icon_round.xml | 21 ------------------- app/src/main/res/values-v31/styles.xml | 3 ++- app/src/main/res/xml/preferences.xml | 2 +- 9 files changed, 34 insertions(+), 37 deletions(-) create mode 100644 app/src/main/res/drawable-v31/app_icon_launch_screen.xml create mode 100644 app/src/main/res/drawable/app_icon_launch.xml delete mode 100644 app/src/main/res/drawable/app_icon_round.xml diff --git a/app/src/main/java/io/homeassistant/companion/android/onboarding/welcome/WelcomeView.kt b/app/src/main/java/io/homeassistant/companion/android/onboarding/welcome/WelcomeView.kt index ae96880a694..bcc6132fa5b 100644 --- a/app/src/main/java/io/homeassistant/companion/android/onboarding/welcome/WelcomeView.kt +++ b/app/src/main/java/io/homeassistant/companion/android/onboarding/welcome/WelcomeView.kt @@ -36,13 +36,13 @@ fun WelcomeView( ) { OnboardingScreen(Modifier.verticalScroll(rememberScrollState())) { Image( - painter = painterResource(id = R.drawable.app_icon_round), + painter = painterResource(id = R.drawable.app_icon_launch), contentDescription = stringResource( id = commonR.string.app_name ), modifier = Modifier - .size(width = 274.dp, height = 202.dp) - .padding(bottom = 16.dp) + .size(width = 112.dp, height = 148.dp) + .padding(bottom = 32.dp) ) Text( fontSize = 19.sp, diff --git a/app/src/main/java/io/homeassistant/companion/android/widgets/camera/CameraWidget.kt b/app/src/main/java/io/homeassistant/companion/android/widgets/camera/CameraWidget.kt index 036a3843b2f..2f73c1e070f 100755 --- a/app/src/main/java/io/homeassistant/companion/android/widgets/camera/CameraWidget.kt +++ b/app/src/main/java/io/homeassistant/companion/android/widgets/camera/CameraWidget.kt @@ -141,10 +141,6 @@ class CameraWidget : AppWidgetProvider() { if (widget != null) { setViewVisibility(R.id.widgetCameraError, if (widgetCameraError) View.VISIBLE else View.GONE) if (url == null) { - setImageViewResource( - R.id.widgetCameraImage, - R.drawable.app_icon_round - ) setViewVisibility( R.id.widgetCameraPlaceholder, View.VISIBLE diff --git a/app/src/main/java/io/homeassistant/companion/android/widgets/mediaplayer/MediaPlayerControlsWidget.kt b/app/src/main/java/io/homeassistant/companion/android/widgets/mediaplayer/MediaPlayerControlsWidget.kt index 43696429221..8e08d3c769f 100644 --- a/app/src/main/java/io/homeassistant/companion/android/widgets/mediaplayer/MediaPlayerControlsWidget.kt +++ b/app/src/main/java/io/homeassistant/companion/android/widgets/mediaplayer/MediaPlayerControlsWidget.kt @@ -251,10 +251,6 @@ class MediaPlayerControlsWidget : BaseWidgetProvider() { val baseUrl = serverManager.getServer(widget.serverId)?.connection?.getUrl().toString().removeSuffix("/") val url = if (entityPictureUrl?.startsWith("http") == true) entityPictureUrl else "$baseUrl$entityPictureUrl" if (entityPictureUrl == null) { - setImageViewResource( - R.id.widgetMediaImage, - R.drawable.app_icon_round - ) setViewVisibility( R.id.widgetMediaPlaceholder, View.VISIBLE diff --git a/app/src/main/res/drawable-v26/launch_screen_background.xml b/app/src/main/res/drawable-v26/launch_screen_background.xml index 0a79bfbf0ef..59a4c815541 100644 --- a/app/src/main/res/drawable-v26/launch_screen_background.xml +++ b/app/src/main/res/drawable-v26/launch_screen_background.xml @@ -2,9 +2,9 @@ - + android:drawable="@drawable/app_icon_launch"> \ No newline at end of file diff --git a/app/src/main/res/drawable-v31/app_icon_launch_screen.xml b/app/src/main/res/drawable-v31/app_icon_launch_screen.xml new file mode 100644 index 00000000000..48de4dd94c4 --- /dev/null +++ b/app/src/main/res/drawable-v31/app_icon_launch_screen.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/app/src/main/res/drawable/app_icon_launch.xml b/app/src/main/res/drawable/app_icon_launch.xml new file mode 100644 index 00000000000..06820d5ee93 --- /dev/null +++ b/app/src/main/res/drawable/app_icon_launch.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/app_icon_round.xml b/app/src/main/res/drawable/app_icon_round.xml deleted file mode 100644 index 01cdd38f806..00000000000 --- a/app/src/main/res/drawable/app_icon_round.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/src/main/res/values-v31/styles.xml b/app/src/main/res/values-v31/styles.xml index 673f039134a..c87edc9d1e2 100644 --- a/app/src/main/res/values-v31/styles.xml +++ b/app/src/main/res/values-v31/styles.xml @@ -1,12 +1,13 @@ - +