Update desktop mode caption bar to newest spec
Updates the caption bar layout in proto1/proto2 to a new model with a close button and an app info view group. Also applies a small refactor so that ALL views are updated only from relayout using the latest task state instead of allowing certain views to be updated independently (such as caption/color from onTaskInfoChange or button clicks), which led to some synchronization issues leading to visual errors. Visual changes: 1. In proto 1 / proto 2 (desktop mode), the caption now has a close button and the handle bar was replaced with a left-aligned view group which contains the app icon, app name and an expand button which when clicked opens the handle menu. The middle section of the caption bar (between the app info and the close button) is now what allows dragging and moving the task. 2. In proto2, the handle menu is aligned to the left when in desktop mode. It continues to be centered when in fullscreen 3. Fixes issue where the app handle was sometimes invisible in proto2 on fullscreen tasks. 4. In proto1, the caption handle color was (sometimes) set based on whether desktop mode was active (to dark or light). This conflicted with other logic that sets it based on luminocity of the status bar color to provide contrast. This CL removes the logic based on desktop mode status since it didn't really make sense considering the whole caption is invisible when desktop mode is inactive. 5. In proto1, the caption visibility was set based on the task focus state. It is now always visible to match proto2 (desktop) behavior. Non-visual changes: 1. Split the window decoration layout into two xml files (one for each possible 'type' of caption): FOCUSED (used by proto1 and proto 2 when in fullscreen mode) and APP_CONTROLS (used by proto2 when in desktop). This simplifies the visibility/color updates that #relayout deals with. Instead of a single layout containing all possible views of the caption and having to hide and show some depending on which caption type was "active" at the time, the split layouts now contain only the views that are relevant to that type, so #relayout can check the type of caption and apply updates to only the views that are actually affected by the current state. Bug: 269618335 Bug: 270393915 Test: Enter desktop mode in proto2 and see new spec; Switch between modes in proto1 and make sure the new spec is visible in desktop mode only. Change-Id: I28b8f2668d0ed6ddd4c71b16c44533c051a01bee
Loading
Please register or sign in to comment