fix: opt into edge-to-edge explicitly on both activities - #36
Merged
Conversation
Play flagged the app for relying on the implicit targetSdk-35 edge-to-edge default. Both activities now call enableEdgeToEdge(), which is the fix Google's notice asks for and also collapses two divergent layouts into one: before this, API 29-34 kept opaque system bars while 35+ went edge-to-edge, so whichever device you happened to test on told you nothing about the other. That gap is what let the preview screen ship with cream bars on Android 10 while looking correct on Android 17. The preview screen's Build.VERSION.SDK_INT < 35 branch for black bars is replaced by SystemBarStyle.dark(BLACK), which covers both routes in one call — it paints the scrim where the bars are opaque and goes transparent over the layout's black root where they are not. androidx.activity is pinned at 1.9.3 rather than taken transitively from appcompat, which was supplying 1.8.0. Also clamps the floating scrub-preview bubble to the status-bar inset instead of to y=0, so a short screen cannot push it under the clock, and corrects the themes.xml comment: those bar-colour items no longer decide anything now that enableEdgeToEdge owns bar appearance. Verified on Pixel 10 (API 37) and Mi Pad 4 (API 29): camera list on both, and the preview screen on the Mi Pad, which is the case that regressed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use edge to edge APIs as suggested by google play