Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mobile][photos] Fix square Android widget corners

laurenspriem298253e1f0a5
diff --git a/mobile/apps/photos/android/app/src/main/res/drawable-v31/widget_background.xml b/mobile/apps/photos/android/app/src/main/res/drawable-v31/widget_background.xml
new file mode 100644
index 0000000000..23e17b0fb1
--- /dev/null
+++ b/mobile/apps/photos/android/app/src/main/res/drawable-v31/widget_background.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <solid android:color="@color/widget_placeholder_bg"/>
+ <corners android:radius="@android:dimen/system_app_widget_background_radius"/>
+</shape>
diff --git a/mobile/apps/photos/android/app/src/main/res/layout/albums_widget_layout.xml b/mobile/apps/photos/android/app/src/main/res/layout/albums_widget_layout.xml
index 30d329e570..4d58e4da30 100644
--- a/mobile/apps/photos/android/app/src/main/res/layout/albums_widget_layout.xml
+++ b/mobile/apps/photos/android/app/src/main/res/layout/albums_widget_layout.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/HomeWidgetContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/widget_container">
diff --git a/mobile/apps/photos/android/app/src/main/res/layout/memory_widget_layout.xml b/mobile/apps/photos/android/app/src/main/res/layout/memory_widget_layout.xml
index ee043c7de1..f61c98fa79 100644
--- a/mobile/apps/photos/android/app/src/main/res/layout/memory_widget_layout.xml
+++ b/mobile/apps/photos/android/app/src/main/res/layout/memory_widget_layout.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/HomeWidgetContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/widget_container">
diff --git a/mobile/apps/photos/android/app/src/main/res/layout/people_widget_layout.xml b/mobile/apps/photos/android/app/src/main/res/layout/people_widget_layout.xml
index 4f54c25619..2e17e0ddc9 100644
--- a/mobile/apps/photos/android/app/src/main/res/layout/people_widget_layout.xml
+++ b/mobile/apps/photos/android/app/src/main/res/layout/people_widget_layout.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/HomeWidgetContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/widget_container">
diff --git a/mobile/apps/photos/android/app/src/main/res/values-v31/widget_styles.xml b/mobile/apps/photos/android/app/src/main/res/values-v31/widget_styles.xml
new file mode 100644
index 0000000000..7f46393ce1
--- /dev/null
+++ b/mobile/apps/photos/android/app/src/main/res/values-v31/widget_styles.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <style name="HomeWidgetContainer">
+ <item name="android:background">@drawable/widget_background</item>
+ <item name="android:clipToOutline">true</item>
+ </style>
+</resources>
diff --git a/mobile/apps/photos/android/app/src/main/res/values/widget_styles.xml b/mobile/apps/photos/android/app/src/main/res/values/widget_styles.xml
new file mode 100644
index 0000000000..244950c670
--- /dev/null
+++ b/mobile/apps/photos/android/app/src/main/res/values/widget_styles.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <style name="HomeWidgetContainer"/>
+</resources>
diff --git a/mobile/apps/photos/changes/android-widget-rounded-corners.md b/mobile/apps/photos/changes/android-widget-rounded-corners.md
new file mode 100644
index 0000000000..636645cd82
--- /dev/null
+++ b/mobile/apps/photos/changes/android-widget-rounded-corners.md
@@ -0,0 +1 @@
+- Fixed square corners on home screen widgets on Android 12 and newer.