Material-components-android: Material Companent Theme with NoActionBar

Created on 25 Jul 2019  路  3Comments  路  Source: material-components/material-components-android

When you use a NoActionBar, the status bar color is not affected by colorPrimaryVariant, so you have to use the older colorPrimaryDark.

I tried Light and DayNight NoActionBar. Both have the same issue.

bug

Most helpful comment

@dsn5ft I think it has no sense to keep using colorPrimaryDark if it is not appearing in Material Design guidelines. At least it should be added then in this page: https://material.io/design/color/#color-theme-creation

image

All 3 comments

This is somewhat intentional. Since by default status bars are assumed to be a relatively dark color (the status bar text and icons are light by default),colorPrimaryDark is semantically a better fit; whereas colorPrimaryVariant could either be lighter or darker than colorPrimary.

@dsn5ft I think it has no sense to keep using colorPrimaryDark if it is not appearing in Material Design guidelines. At least it should be added then in this page: https://material.io/design/color/#color-theme-creation

image

Would like to revive the issue. The problem still exists - just today spent ~40 minutes trying to find what is missing in my setup and why colorPrimaryVariant is ignored. Please update info on https://material.io/design/color/#color-theme-creation page.

Was this page helpful?
0 / 5 - 0 ratings