Merge pull request #1927 from MilosKozak/splash

Splash logo
This commit is contained in:
Milos Kozak 2019-08-01 17:06:55 +02:00 committed by GitHub
commit b3dde001d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 2 deletions

View file

@ -36,7 +36,7 @@
android:label="@string/app_name"
android:roundIcon="${appIconRound}"
android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar"
android:theme="@style/AppTheme.Launcher"
android:fullBackupContent="true">
<meta-data
android:name="com.google.android.gms.car.application"

View file

@ -74,6 +74,7 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.AppTheme_NoActionBar);
super.onCreate(savedInstanceState);
if (L.isEnabled(L.CORE))

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- The android:opacity=”opaque” linethis is critical in preventing a flash of black as your theme transitions. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<!-- The background color, preferably the same as your normal theme -->
<item android:drawable="@color/splashBackground"/>
<!-- Your product logo - 144dp color version of your app icon -->
<item>
<bitmap
android:src="@drawable/splash_icon"
android:gravity="center"/>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View file

@ -83,5 +83,5 @@
<color name="ribbonTextWarning">#303030</color>
<color name="ribbonTextCritical">#FFFFFF</color>
<color name="ic_launcher_background">#424242</color>
<color name="splashBackground">#2E2E2E</color>
</resources>

View file

@ -1,5 +1,12 @@
<resources>
<!-- The launcher theme. It sets the main window background to the launch_screen drawable -->
<style name="AppTheme.Launcher">
<item name="android:windowBackground">@drawable/launch_screen</item>
<!-- Optional, on Android 5+ you can modify the colorPrimaryDark color to match the windowBackground color for further branding-->
<!-- <item name="colorPrimaryDark">@android:color/white</item> -->
</style>
<style name="AppTheme" parent="Theme.AppCompat">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>