When signing in (Firebase), the bottom nav bar is white instead of black
Closed this issue · 0 comments
So this is kind of a weird issue. I've got my bottom nav bar set to black both in XML and in my Activity's onCreate method. Except when signing into my app, it is white. If I then close the app and re-open it (already being signed in), it is black as it should be. But if I were to sign out and sign in again it'd be white until I again restart the app.
To give a quick high level idea of how I'm handling sign in (in case this matters):
When a user opens the app, it opens to MainActivity.java (the activity with the bottom nav). Immediately there is a check as to whether a user is signed in or not. If not, an intent sends the user to the sign in page. Once signed in, an intent sends the user back to MainActivity.java. The bottom nav bar is now white for some reason. If the user closes the app and re-opens it, it is now black as it should be.
Hopefully this is something obvious, if not just let me know and I'll post any relevant code.
Thank you for your time
Edit: Found another instance of this happening. I opened up the app and the bottom nav was black. I then went to a few other activites, then hit the back button until I was back on MainActivity. Now the bottom nav is white! Very strange...
Edit2: Yep, I'm testing more and the nav bar turns white any time the MainActivity is reached via onBackPressed.
Edit3: After more testing, it appears to be fixed if I add
android:backgroundTint="@color/black"
Which is unfortunate because it relies on API 21+, and my app is 17+. Any way to disable this behavior altogether? How to keep it from applying a white tint?