当我最初启动我的应用程序时,我得到一个黑屏,在我的主要活动开始之前停留几秒钟.在iphone的情况下,显示名称默认的图像.我不确定如何在Android中做同样的事情.我试着如下徒劳:
<activity android:name=".Index"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@drawable/defaultimage">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)
YaW*_*YaW 15
我猜你对"索引"活动的onCreate方法进行了大量操作.
你应该把繁重的操作放在一个线程上并用图像制作一个闪屏,当线程完成后,加载菜单或你需要的任何东西.
例如,您可以制作"加载屏幕".使用Android非常简单:https://developer.android.com/guide/appendix/faq/commontasks.html#progressbar或https://developer.android.com/reference/android/widget/ProgressBar.html
| 归档时间: |
|
| 查看次数: |
14284 次 |
| 最近记录: |