Last active
May 21, 2019 17:42
-
-
Save UtkuGlsvn/7c06ca9243412b0cb3900d83989bcf70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Drawable: | |
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:drawable="@color/colorPrimary"/> | |
<item android:gravity="center"> | |
<bitmap android:src="@drawable/my_logo" | |
android:gravity="center"> | |
</bitmap> | |
</item> | |
</layer-list> | |
-------------------------------------------------------- | |
java: | |
public class SplashActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
startActivity(new Intent(SplashActivity.this,MainActivity.class)); | |
finish(); | |
} | |
------------------------------------------------------------------- | |
-> Android Manifest | |
android:theme="@style/AppTheme.SplashTheme"> | |
<activity android:name=".SplashActivity"> | |
---------------------------------------------------------------------- | |
Style xml: | |
<!-- SplashScreen theme. --> | |
<style name="AppTheme.SplashTheme"> | |
<item name="android:windowBackground">@drawable/splash_background</item> | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment