Android Changing Activity Theme onCreate


I want to change the android:theme during runtime depending on some conditions. I have tried extending the Android Activity following:

        if (!this._callbacks) {
        const id = this.getResources().getIdentifier("Theme", "style",  this.getPackageName());
        this._callbacks.onCreate(this, savedInstanceState, super.onCreate);
// If I put: super.onCreate(savedInstanceState) instead of  ^ the theme will change, but never disappears. 

What exactly is the difference between calling just super and the callback? By using super I can change the theme, but it never disappears. As for the callback it seems to just ignore the theme I am trying to set regardless if I set it before or after the callback.


May I know what you mean by it never disappears?


Sorry, I was very vague. The theme I set (in this case for testing I put the splash screen) is the only thing visible and at that point in the log I notice that nothing is outputted as though the app is frozen.