mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-05-11 09:33:04 -04:00
Fix custom theme not applying to main screen correctly
We were using the SplashScreen incorrectly. While it isn't consistently documented, I managed to find a small note on https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreen#usage-of-the-core-splashscreen-library: which states that installSplashScreen has to be called BEFORE onCreate. Doing this fixing some theming bugs and allows deleting a hacky and buggy workaround.
This commit is contained in:
@@ -19,10 +19,7 @@ public class CatimaAppCompatActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
// XXX splash screen activity has to do this after installing splash screen before view inflate
|
||||
if (!this.getClass().getSimpleName().equals(MainActivity.class.getSimpleName())) {
|
||||
Utils.patchColors(this);
|
||||
}
|
||||
Utils.patchColors(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user