Here's a somewhat related answer for anyone else that has a similar problem.
tl;dr
Adding a new style where the name is a suffix of an existing style can cause problems (like making transparent activities have a black screen).
Problem:
Our transparent activity background was black after doing a large refactor. (The activity was already using a transparent theme.)
After several hours of going through commits I found what seemed to be the cause of the problem. In our app we use styles like CSS. There was an existing style like this that we applied to a TextView.
<style name="HeadLine.SM.White.MyFontBold">
<item name="android:fontFamily">@font/some_bold_font</item>
</style>
The non-bold variant of the style was added as a style before the bold variant as below.
//This style was added
<style name="HeadLine.SM.White.MyFont">
<item name="android:fontFamily">@font/some_font</item>
</style>
<style name="HeadLine.SM.White.MyFontBold">
<item name="android:fontFamily">@font/some_bold_font</item>
</style>
For some reason, after the non-bold style variant was added all transparent activities had a black screen. When we changed the non-bold variant style name to something else it fixed the problem for us.
Now our styles look like this (I know there are better ways to handle font styles - these styles are a few years old).
<style name="HeadLine.SM.White.MyFontRegular">
<item name="android:fontFamily">@font/some_font</item>
</style>
<style name="HeadLine.SM.White.MyFontBold">
<item name="android:fontFamily">@font/some_bold_font</item>
</style>
Conclusion
It seemed that adding a new style where the name is a suffix of an existing style caused problems. If you're adding a new style make sure the name is not a suffix of an existing style.
We did try cleaning the build, rebuilding, and invalidating Android Studio caches. None of these things solved our problem.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…