Android Question setDefaultNightMode before activity onCreate()


Active Member

Sometimes we need to apply a theme other than the phone's default theme
for example: phone's theme is Dark(night) and i want to set Light theme programmatically when my app starts
as @Erel said in THIS thread we can use "setDefaultNightMode"
but this is not enough when an activity created, because a dark theme is always seen(about 100 miliseconds) before the light theme is displayed and It doesn't look attractive
you tries to solve this problem by using the hooks at "changing the theme at runtime" tutorial
and If I understand correctly, I must use this code to do this
#if java
public void _onCreate() {
#end if
but still a dark theme seen before switching to light

i found something like this over internet
protected void onCreate(Bundle savedInstanceState) {
Which points to this ===> Use setDefaultNightMode before super.onCreate
but when i tries to override this method by using inline java, it seems B4A is used this function internally and i can't have access to this method in my code
how can i to do?
is this possible to run setDefaultNightMode before super.onCreate method in b4a? or some thing similar
It's really nerve-wracking for me
thanks all in advance