Use the nav bar color as the scrim color with 80% alpha
To make the color of the 3-button nav bar scrim match the app's theme or match the UI element (ex: panel, tool bar, ..., etc) docked on the nav bar when the edge-to-edge policy is enforced, the logic of the scrim is refined as follows: If the nav bar color is specified, and - alpha != 0, the scrim color will be the nav bar color with 80% alpha; - alpha == 0, the scrim color logic will fallback to the existing one. If the nav bar color is not specified, the scrim color will be the window background color with 80% alpha. The icon color of nav bar will be adjusted accordingly to ensure the contrast. Bug: 309578419 Test: 1. Specify nav bar color via Java and see if the nav bar color is as expected in 3-button mode but transparent in gesture mode. 2. Specify nav bar color via XML and see if the nav bar color is as expected in 3-button mode but transparent in gesture mode. 3. Specify window background color and see if the nav bar color is as expected in 3-button mode but transparent in gesture mode. Change-Id: Id3aea6cedc29732dcfe1a537c24312f184c956fe
Loading
Please register or sign in to comment