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

Commit d72cc8d2 authored by Kazuki Takise's avatar Kazuki Takise
Browse files

Implement expand menu error icon

This change introduces "expand menu error icon", which is shown
when one of the handle menu items need to get special attention.

The current intended usage is restart menu. When an app moves
between displays, the restart menu shows up in the restart menu,
and to nudge the user to user the menu, we want to show an error
icon both on the app header and the handle menu. (This change
handles only the app header part of the change.)

See [1] and [2] for the actual UI visuals.

The key points of the implementation are as follows:

- Enclose app name text view with FrameLayout
  This is needed as the error icon needs to overlap with the app
  name especially when the app name is long [2]. When the name is
  short enough, the text view of the app name still overlaps with
  the icon, but the padding is properly added, so from the user's
  persipective, it looks like they look just horizentally aligned.

- Apply fadeout affect instead of ellipsize="end"
  To improve the visual of the long app name, the new spec [2]
  defines the app name should fade out instead of "...".
  As the fadeout effect isn't provided with TextView by default,
  this changes introduces a custom shader to achieve this effect.

[1] go/app-header-error-icon-short
[2] go/app-header-error-icon-long

Flag: com.android.window.flags.enable_restart_menu_for_connected_displays
Bug: 400575851
Test: DesktopModeWindowDecorationTests
Change-Id: Id0655abda5c295deaa9df80cd366caee5682292e
parent f0fedb8f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment