#206 Implement splash screen (#211)

Fix #206 Implement splash screen
This commit is contained in:
Niedermann IT-Dienstleistungen 2017-05-08 08:15:02 +02:00 committed by GitHub
parent fad71709ea
commit 472d549677
4 changed files with 44 additions and 3 deletions

View file

@ -14,14 +14,19 @@
android:networkSecurityConfig="@xml/network_security_config" android:networkSecurityConfig="@xml/network_security_config"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/OwnCloud"> android:theme="@style/OwnCloud">
<activity
android:name="it.niedermann.owncloud.notes.android.activity.SplashscreenActivity"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity <activity
android:name="it.niedermann.owncloud.notes.android.activity.NotesListViewActivity" android:name="it.niedermann.owncloud.notes.android.activity.NotesListViewActivity"
android:label="@string/app_name"> android:label="@string/app_name">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.SEARCH" /> <action android:name="android.intent.action.SEARCH" />
</intent-filter> </intent-filter>

View file

@ -0,0 +1,20 @@
package it.niedermann.owncloud.notes.android.activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
/**
* Created by stefan on 18.04.17.
*/
public class SplashscreenActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent(this, NotesListViewActivity.class);
startActivity(intent);
finish();
}
}

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/bg_normal" />
<item>
<bitmap
android:gravity="center"
android:src="@drawable/ic_launcher" />
</item>
</layer-list>

View file

@ -28,4 +28,8 @@
<item name="android:padding">@dimen/button_padding</item> <item name="android:padding">@dimen/button_padding</item>
<item name="android:elevation">@dimen/button_elevation</item> <item name="android:elevation">@dimen/button_elevation</item>
</style> </style>
<style name="SplashTheme" parent="OwnCloud">
<item name="android:windowBackground">@drawable/splashscreen</item>
</style>
</resources> </resources>