6

I am using the theme Theme.MaterialComponents.DayNight.NoActionBar (docs) for my Android app.

I am also calling getActionBar().hide() in the MainActivity.

On nearly all my devices, the Action Bar is not displaying. However on one device, a Pixel 6 running Android 12, I still see the Action Bar. I am sure I've installed the latest version of my app.

Any ideas why the Action Bar is still hanging around on this one device?

Raphi OKG
  • 73
  • 5

1 Answers1

3

I had the same problem (I thought) until I realized that I had set the .NoActionBar style in my values/themes.xml but NOT in my values-night/themes.xml and the device with the "issue" was in dark mode.

Solution: Set Theme.MaterialComponents.DayNight.NoActionBar in both values/themes.xml and values-night/themes.xml.