Skip to content

Disable translucent system bars in theme, use FLAG_LAYOUT_NO_LIMITS instead - #83

Open
ketansp wants to merge 1 commit into
masterfrom
claude/top-color-difference-86srfo
Open

Disable translucent system bars in theme, use FLAG_LAYOUT_NO_LIMITS instead#83
ketansp wants to merge 1 commit into
masterfrom
claude/top-color-difference-86srfo

Conversation

@ketansp

@ketansp ketansp commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

Removes the android:windowTranslucentStatus and android:windowTranslucentNavigation theme attributes (set to false) and relies instead on FLAG_LAYOUT_NO_LIMITS (set in MainActivity) combined with transparent statusBarColor/navigationBarColor to achieve edge-to-edge layout. This prevents the system from painting its legacy scrim gradient behind the status and navigation bars.

Changes

  • Theme files (values/styles.xml and values-night/styles.xml):

    • Changed android:windowTranslucentStatus from true to false
    • Changed android:windowTranslucentNavigation from true to false
    • Added explanatory comments clarifying that edge-to-edge layout now comes from FLAG_LAYOUT_NO_LIMITS + transparent bar colors, avoiding the system's legacy scrim
  • AppDrawerFragment.kt:

    • Updated code comments to reflect the new approach (removed mention of translucent system bars from the theme)
    • Clarified that FLAG_LAYOUT_NO_LIMITS is the sole mechanism for edge-to-edge layout
    • Enhanced RESIZE_BLOCKING_WINDOW_FLAGS documentation to note that only flags actually set on the window are cleared/restored, allowing safe listing of deprecated flags (e.g., translucent-bar flags)

Implementation Details

The translucent bar theme attributes were causing the system to render a scrim gradient behind the status and navigation bars. By disabling these and relying on FLAG_LAYOUT_NO_LIMITS (already set in MainActivity) with transparent bar colors, the wallpaper now runs seamlessly under the bars without the unwanted scrim overlay. The AppDrawerFragment's keyboard handling logic remains unchanged—it still clears FLAG_LAYOUT_NO_LIMITS when the drawer is visible to allow the search bar to sit above the keyboard.

https://claude.ai/code/session_01SPjCmnoUpqfm5D2JGfzqmg

The system was painting its legacy translucent-status-bar gradient behind
the clock/battery, leaving a visibly tinted band with a seam at the bottom
of the status bar. windowTranslucentStatus/windowTranslucentNavigation set
FLAG_TRANSLUCENT_STATUS/NAVIGATION, which draw that scrim independently of
the transparent statusBarColor.

Set both to false. Edge-to-edge layout is already provided by
FLAG_LAYOUT_NO_LIMITS (MainActivity) plus the transparent bar colors, so the
generated wallpaper now runs seamlessly under the status and navigation bars.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SPjCmnoUpqfm5D2JGfzqmg
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.

2 participants