I am trying to load around 168kb (after optimization in tinypng.com) image as splash screen. Its crashing with below VERBOSE (no errors)-
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
This is how I have implemented splash screen-
Activity:
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
//setContentView(R.layout.activity_splash1);--> Note this is commented
/* New Handler to start the Menu-Activity
* and close this Splash-Screen after some seconds.*/
new Handler().postDelayed(new Runnable(){
@Override
public void run() {
/* Create an Intent that will start the Menu-Activity. */
Intent mainIntent = new Intent(SplashActivity1.this,MainActivity.class);
SplashActivity1.this.startActivity(mainIntent);
SplashActivity1.this.finish();
}
}, SPLASH_DISPLAY_LENGTH);
}
Manifest Entry:
<activity
android:name=".ui.activities.SplashActivity1"
android:screenOrientation="portrait"
android:theme= "@style/AppTheme.NoActionBar.SplashActivity1">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Styles:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorTheme</item>
<item name="colorAccent">@color/colorBlack</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.NoActionBar.SplashActivity1" parent="AppTheme.NoActionBar">
<item name="android:windowBackground">@drawable/splash1</item>
</style>
Drawable:
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/bootpage">
</bitmap>
Running on: Android Emulator API 6
Thanks in Advance