use*_*342 3 performance android
当我启动我的应用程序时,我会在启动闪屏之前看到白屏几秒钟.
我想知道我的应用程序的大小是否会影响它(它是17.7MB).或者是因为我的测试设备是旧的(HTC Desire HD)并且有太多数据被破坏了?
或者这是正常的行为?或者问题可能在我的代码中,这是在...
部分清单:
<activity android:name=".SplashView"
android:noHistory="true"
android:screenOrientation="portrait"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"
android:configChanges="orientation" >
<intent-filter >
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)
飞溅活动:
public class SplashView extends SherlockActivity {
private final int SPLASH_DISPLAY_LENGHT = 1000;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().hide();
setContentView(R.layout.splash_view);
try {
RefreshRatingsTask urt = new RefreshRatingsTask();
urt.execute();
} catch (Exception e) {
// ignore
}
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent mainIntent = new Intent(SplashView.this,
MainActivity.class);
SplashView.this.startActivity(mainIntent);
SplashView.this.finish();
}
}, SPLASH_DISPLAY_LENGHT);
}
}
Run Code Online (Sandbox Code Playgroud)
谢谢
| 归档时间: |
|
| 查看次数: |
6409 次 |
| 最近记录: |