Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0f52381b authored by Jorge Gil's avatar Jorge Gil
Browse files

Update App Header background/foreground style

Adds support for additional background and foreground color changes
based on system theme, app theme, focused state and default vs custom
headers. There are 16 different style variations to apply, so some
additional changes were made to make this possible and more readable.
Changes include:
1) Default header background drawable is now composed of two layers:
  backLayer - may be solid white, back or null. Black/white is needed
  when the frontLayer is semi transparent, to avoid showing app content
  behind it.
  fronLayer - usually a solid color (material token) with full opacity,
  but may have some transparency to differentiate between focused and
  unfocused windows that are all forced to use the inverse_surface color
  token, which happens when the system and app's light/dark theme do not
  match (e.g. dark app on light system theme)
2) New Header data class that holds the TaskInfo/System properties that
   have an effect on which style is applied.
3) New HeaderStyle data class, to represent the resulting
   background/foreground configuration calculated based on the Header
   and that will be applied to the view hierarchy.
4) Replaces the Maximize button's default background ripple with a
   custom RippleDrawable, to allow defining selector states with
   different color/alpha combinations.

Flag: com.android.window.flags.enable_themed_app_headers
Bug: 328668781
Bug: 336555032
Test: try all combinations of app states, verify styles
Change-Id: I5f08e66ecccb5909a6a714937af1370021a934fe
parent cf26cf9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment