Skip to content

E2e - #176

Merged
paroj merged 3 commits into
edgefrom
e2e
Oct 19, 2026
Merged

E2e#176
paroj merged 3 commits into
edgefrom
e2e

Conversation

@paroj

@paroj paroj commented Oct 19, 2026

Copy link
Copy Markdown
Owner

No description provided.

paroj added 3 commits October 19, 2026 13:23
The app targets SDK 36, so from API 35 on the platform lays the window out
edge to edge: the theme's android:statusBarColor is ignored, the window is
transparent and the status bar icons are drawn on top of whatever the app
paints there. The drawer layout still carried android:fitsSystemWindows, so
the window background (colorPrimaryDark) showed through behind the status bar
while the action bar and the now playing bar stopped short of the screen
edges, and the navigation bar area was left black.

Drop fitsSystemWindows from the drawer layout and handle the insets per view
in SubsonicActivity.applyEdgeToEdgeInsets(), which listens on the decor for
systemBars()|displayCutout():

- both toolbars grow by the top inset and take the same inset as padding, so
  their background paints the status bar while the title and the icons stay
  below it; the content of the main activity follows with its top margin
- the now playing bar keeps the navigation bar area coloured: the swipe
  target is padded at the bottom and the panel height is raised by the same
  amount, so the collapsed bar stays the same visual height
- the now playing fragment container and the drawer are padded at the bottom,
  the drawer header is padded and grown by the top inset (its height is
  fixed, padding alone would squeeze its content)
- screens without a now playing bar (the settings activity) pad their content
  frame at the bottom instead
- nothing is applied in full screen mode, where the bars are hidden anyway

Since the status bar icons now sit on the action bar colour, take the icon
contrast in applyEdgeToEdge() from actionbarBackgroundColor (or the custom
action bar colour) instead of colorPrimaryDark.
The settings screens run on the deprecated android.preference framework, so
their widgets are still platform styled. Two things were visibly non-M3:

- Category headers: the platform layout hardcodes TextAppearance.Material.Body2
  and ?android:attr/colorAccent. android:preferenceCategoryStyle now points at
  our own layout using the M3 type scale and colorPrimary.
- Preference dialogs: the platform DialogPreference creates framework
  AlertDialogs, which read android:alertDialogTheme. MaterialComponents sets it
  to its Material 2 overlay, so these dialogs looked M2 next to the app's
  MaterialAlertDialogs. Point it at the M3 framework overlay instead.

The overlay is applied on top of the activity theme, so the Light/Dark/Black/
Holo colour roles carry over without re-declaring them.

Preference rows themselves needed nothing: the platform row layout already
takes its typography from ?attr/textAppearanceListItem, which the M3 theme
defines.
The last place that built a classic AppCompat AlertDialog. The preference
framework still creates framework AlertDialogs; those are handled separately.
@paroj
paroj merged commit dd9c3e3 into edge Oct 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant