Skip to content

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

Open
david-allison wants to merge 5 commits into
ankidroid: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 into
ankidroid:mainfrom
david-allison:edge-to-edge-browser

Conversation

@david-allison

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

Copy link
Copy Markdown
Member

Note

Assisted-by: Claude Opus 4.7 - understanding and fix of windowBackground issue
Assisted-by: Claude Fable 5 - last commit

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
@david-allison david-allison force-pushed the edge-to-edge-browser branch from d126936 to 725a33e Compare May 5, 2026 19:05
@david-allison

Copy link
Copy Markdown
Member Author

I want to fix this for rounded corners and the RecyclerFastScroller

@david-allison david-allison marked this pull request as draft May 6, 2026 16:55
@david-allison david-allison marked this pull request as draft May 6, 2026 16:55
@david-allison david-allison added Needs Author Reply Waiting for a reply from the original author labels May 6, 2026
@github-actions

This comment was marked as outdated.

@github-actions github-actions Bot added the Stale label May 20, 2026
@david-allison david-allison added the Review High Priority Request for high priority review label May 29, 2026
@david-allison david-allison force-pushed the edge-to-edge-browser branch 2 times, most recently from 9981ea4 to 15968e5 Compare May 29, 2026 17:12
@github-actions

This comment was marked as outdated.

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
@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Snapshot diff report vs main. Open screenshot-diff for diffs.

  • CardBrowserScreenshotTest: 2 changes
All 2 changed screenshots

CardBrowserScreenshotTest

  • 30_notes_compare.png
  • scrolled_to_bottom_compare.png

@david-allison

david-allison commented Jun 14, 2026

Copy link
Copy Markdown
Member Author

Handling Corners

When scrolled to the bottom, no clickable elements should be obscured by corners, even slightly.

This means that the following should be aligned when scrolled to the bottom:

  • top of the bottom corner
  • bottom of the scroll track
  • bottom of the scroll handle
  • last row

In addition: if the bottom of the last row is visible on the screen, the bottom of the track should match the bottom of the last row (scrolling up, once there are no more rows).

Rough plan: when scrolled to the bottom (Google Pixel 9 Pro)

image

@github-actions

This comment was marked as outdated.

@github-actions github-actions Bot added the Stale label Jun 28, 2026
@github-actions github-actions Bot closed this Jul 6, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in AnkiDroid 2.25 Jul 6, 2026
@david-allison david-allison reopened this Jul 6, 2026
@david-allison david-allison marked this pull request as ready for review July 7, 2026 23:50
@david-allison david-allison removed the Needs Author Reply Waiting for a reply from the original author label Jul 7, 2026
As we enabled edge-to-edge, the fast scroller and the
list could be obscured by rounded corners of a phone

* when the list is fully scrolled, the bottom of the list
 is flush with the top of the bottom corner
* at the bottom extremity, the scrollbar track moves up along with the
bottom of the rows
* Therefore when scrolled to the bottom, all content is 'safe'

Assisted-by; Claude Fable 5
@david-allison david-allison force-pushed the edge-to-edge-browser branch from 30cf0b6 to a86b5bb Compare July 8, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Review High Priority Request for high priority review

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants