Implementing launch screen for android with Delphi/Firemonkey

  

reading the https://developer.android.com/topic/performance/vitals/launch-time about the right way to implement a launch screen they say to create a Launcher style

<activity …
android:theme=”@style/AppTheme.Launcher” />

and they say that the easiest way to transition back to your normal theme is to call setTheme(R.style.AppTheme) before calling super.onCreate() and setContentView():

KOTLIN
JAVA
public class MyMainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// Make sure this is before calling super.onCreate
setTheme(R.style.Theme_MyApp);
super.onCreate(savedInstanceState);
// …
}
}

problem is with delphi, when/where can I call setTheme(R.style.Theme_MyApp); ? from inside the form create it’s not work so seam already too late, and even just after Application.Initialize it’s seam to not work either 🙁

Comments are closed.