mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2025-01-31 21:12:44 +01:00
[UI] Use different splash background depending on api level (#54)
This commit is contained in:
parent
4c7c2a1101
commit
9f599025ba
@ -3,6 +3,7 @@ package io.github.wulkanowy.ui.base;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.support.v7.app.AppCompatDelegate;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import butterknife.Unbinder;
|
import butterknife.Unbinder;
|
||||||
@ -23,6 +24,8 @@ public abstract class BaseActivity extends AppCompatActivity implements BaseCont
|
|||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
|
||||||
|
|
||||||
activityComponent = DaggerActivityComponent.builder()
|
activityComponent = DaggerActivityComponent.builder()
|
||||||
.activityModule(new ActivityModule(this))
|
.activityModule(new ActivityModule(this))
|
||||||
.applicationComponent(((WulkanowyApp) getApplication()).getApplicationComponent())
|
.applicationComponent(((WulkanowyApp) getApplication()).getApplicationComponent())
|
||||||
|
14
app/src/main/res/drawable-v15/splash_background.xml
Normal file
14
app/src/main/res/drawable-v15/splash_background.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<solid android:color="#FFF" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<bitmap
|
||||||
|
android:gravity="center"
|
||||||
|
android:src="@mipmap/ic_launcher"/>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
15
app/src/main/res/drawable-v23/splash_background.xml
Normal file
15
app/src/main/res/drawable-v23/splash_background.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<solid android:color="#FFF" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:width="250dp"
|
||||||
|
android:height="250dp"
|
||||||
|
android:drawable="@drawable/img_splash_512px"
|
||||||
|
android:gravity="center">
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
@ -5,12 +5,4 @@
|
|||||||
<solid android:color="#FFF" />
|
<solid android:color="#FFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item
|
|
||||||
android:width="250dp"
|
|
||||||
android:height="250dp"
|
|
||||||
android:drawable="@drawable/img_splash_512px"
|
|
||||||
android:gravity="center">
|
|
||||||
<!-- Only for 23 sdk -->
|
|
||||||
</item>
|
|
||||||
</layer-list>
|
</layer-list>
|
Loading…
x
Reference in New Issue
Block a user