Skip to content

feat(card-browser): edge to edge support & code cleanup#20938

Open
david-allison wants to merge 5 commits intoankidroid:mainfrom
david-allison:edge-to-edge-browser
Open

feat(card-browser): edge to edge support & code cleanup#20938
david-allison wants to merge 5 commits intoankidroid:mainfrom
david-allison:edge-to-edge-browser

Conversation

@david-allison
Copy link
Copy Markdown
Member

@david-allison david-allison commented May 4, 2026

Note

Assisted-by: Claude Opus 4.7 - understanding and fix of windowBackground issue

Fixes

How Has This Been Tested?

API 24 + API 33 emulators, private branch with Roborazzi

(scrolling to the bottom does not truncate rows)

image Screenshot 2026-05-04 at 08 11 24 Screenshot 2026-05-04 at 08 09 52
Subject: [PATCH] !!edge to edge
---
Index: AnkiDroid/src/main/res/values-v35/theme_black.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/AnkiDroid/src/main/res/values-v35/theme_black.xml b/AnkiDroid/src/main/res/values-v35/theme_black.xml
--- a/AnkiDroid/src/main/res/values-v35/theme_black.xml	(revision 182e7993e1207d0c493df461beefb86e3d098849)
+++ b/AnkiDroid/src/main/res/values-v35/theme_black.xml	(revision 713e19ef60adb5637dc9243525f447dbe4e7b2cf)
@@ -15,9 +15,5 @@
   -->
 
 <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="DuplicateCrowdInStrings">
-    <style name="Base.V35.Dark.Black" parent="@style/Base.Theme.Dark.Black">
-        <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
-    </style>
-
-    <style name="Theme_Dark.Black" parent="Base.V35.Dark.Black"/>
+    <style name="Theme_Dark.Black" parent="@style/Base.Theme.Dark.Black"/>
 </resources>
\ No newline at end of file
Index: AnkiDroid/src/main/res/values-v35/theme_dark.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/AnkiDroid/src/main/res/values-v35/theme_dark.xml b/AnkiDroid/src/main/res/values-v35/theme_dark.xml
--- a/AnkiDroid/src/main/res/values-v35/theme_dark.xml	(revision 182e7993e1207d0c493df461beefb86e3d098849)
+++ b/AnkiDroid/src/main/res/values-v35/theme_dark.xml	(revision 713e19ef60adb5637dc9243525f447dbe4e7b2cf)
@@ -15,9 +15,5 @@
   -->
 
 <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="DuplicateCrowdInStrings">
-    <style name="Base.V35.Dark" parent="Base.V29.Dark">
-        <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
-    </style>
-
-    <style name="Theme_Dark" parent="Base.V35.Dark"/>
+    <style name="Theme_Dark" parent="Base.V29.Dark"/>
 </resources>
Index: AnkiDroid/src/main/res/values-v35/theme_light.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/AnkiDroid/src/main/res/values-v35/theme_light.xml b/AnkiDroid/src/main/res/values-v35/theme_light.xml
--- a/AnkiDroid/src/main/res/values-v35/theme_light.xml	(revision 182e7993e1207d0c493df461beefb86e3d098849)
+++ b/AnkiDroid/src/main/res/values-v35/theme_light.xml	(revision 713e19ef60adb5637dc9243525f447dbe4e7b2cf)
@@ -16,9 +16,5 @@
   -->
 
 <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="DuplicateCrowdInStrings">
-    <style name="Base.V35.Light" parent="Base.V29.Light">
-        <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
-    </style>
-
-    <style name="Theme_Light" parent="Base.V35.Light"/>
+    <style name="Theme_Light" parent="Base.V29.Light"/>
 </resources>
Index: AnkiDroid/src/main/res/values-v35/theme_plain.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/AnkiDroid/src/main/res/values-v35/theme_plain.xml b/AnkiDroid/src/main/res/values-v35/theme_plain.xml
--- a/AnkiDroid/src/main/res/values-v35/theme_plain.xml	(revision 182e7993e1207d0c493df461beefb86e3d098849)
+++ b/AnkiDroid/src/main/res/values-v35/theme_plain.xml	(revision 713e19ef60adb5637dc9243525f447dbe4e7b2cf)
@@ -15,9 +15,5 @@
   -->
 
 <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="DuplicateCrowdInStrings">
-    <style name="Base.V29.Light.Plain" parent="@style/Base.Theme.Light.Plain">
-        <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
-    </style>
-
-    <style name="Theme_Light.Plain" parent="Base.V29.Light.Plain"/>
+    <style name="Theme_Light.Plain" parent="@style/Base.Theme.Light.Plain"/>
 </resources>
\ No newline at end of file
Index: gradle/libs.versions.toml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
--- a/gradle/libs.versions.toml	(revision 182e7993e1207d0c493df461beefb86e3d098849)
+++ b/gradle/libs.versions.toml	(revision 713e19ef60adb5637dc9243525f447dbe4e7b2cf)
@@ -10,7 +10,7 @@
 # The API should be as low as possible in order to enable dependencies to stay on a lower minSdk.
 apiMinSdk = "16"
 
-targetSdk = "35"  # affects which SDKs download in ../robolectricDownloader.gradle
+targetSdk = "36"  # affects which SDKs download in ../robolectricDownloader.gradle
 acra = '5.13.1'
 ktlint = '1.8.0'
 # AGP is included in Android Studio and changelogs are not well maintained/at a stable URL

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@david-allison david-allison added this to the 2.25 release milestone May 4, 2026
@david-allison david-allison marked this pull request as draft May 4, 2026 08:29
@david-allison

This comment was marked as resolved.

@david-allison david-allison force-pushed the edge-to-edge-browser branch from b6e5519 to 1815add Compare May 4, 2026 09:30
@david-allison

This comment was marked as resolved.

@david-allison david-allison force-pushed the edge-to-edge-browser branch 2 times, most recently from 95ed22c to d126936 Compare May 4, 2026 17:54
@david-allison david-allison marked this pull request as ready for review May 4, 2026 17:55
For activities with 'Theme_Dark.Launcher', android:windowBackground is
set, but was never removed.

On views with transparent backgrounds (such as the Card Browser column
headers), this leaked through when edge to edge was enabled

Part of issue 17334 - Edge to Edge

Assisted-by: Claude Opus 4.7 - diagnostics + fix
Roborazzi test added to catch future regressions

Issue 17334 - edge to edge

Assisted-by: Claude Opus 4.7 - unit tests
A wrapper was required for the toolbar: adding padding increased the
height from minHeight, so apply the padding to a parent element.

Roborazzi test added to catch future regressions

Issue 17334

Assisted-by: Claude Opus 4.7 - unit tests + frame fix, rest was my own
Added at bind time in BrowserMultiColumnAdapter.kt

Assisted-by: Claude Opus 4.7 - diagnostic
@david-allison david-allison force-pushed the edge-to-edge-browser branch from d126936 to 725a33e Compare May 5, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant