草庐IT

FullscreenTheme

全部标签

Android 在应用程序启动时以编程方式更改 windowBackground

我很清楚如何使用list中的主题和标签windowBackground在Android中设置Activity的splash。一位客户最近出现要求“根据白天的某些事件更改启动画面”。我几乎可以肯定这是不可能完成的,但我决定用这段代码试一试:publicclassMyApplicationextendsApplication{@OverridepublicvoidonCreate(){super.onCreate();intrandom=(int)Math.abs(System.currentTimeMillis()%3);switch(random){case0:setTheme(R.s