Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9730ed20 authored by Kévin Cocchi's avatar Kévin Cocchi Committed by Niedermann IT-Dienstleistungen
Browse files

Use the new Android 12 SplashScreen API

parent 40c3db8b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ dependencies {
    implementation 'androidx.recyclerview:recyclerview-selection:1.1.0'
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    implementation 'androidx.work:work-runtime:2.7.1'
    implementation 'androidx.core:core-splashscreen:1.0.0-rc01'
    implementation 'com.google.android.material:material:1.6.1'

    // Database
+2 −15
Original line number Diff line number Diff line
@@ -22,25 +22,13 @@
        tools:targetApi="n">

        <activity
            android:name=".SplashscreenActivity"
            android:name=".main.MainActivity"
            android:label="@string/app_name"
            android:theme="@style/SplashTheme"
            android:theme="@style/Theme.App.Starting"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data
                android:name="android.app.shortcuts"
                android:resource="@xml/shortcuts" />
        </activity>

        <activity
            android:name=".main.MainActivity"
            android:label="@string/app_name"
            android:exported="false">

            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>

@@ -60,7 +48,6 @@
            android:name=".AppendToNoteActivity"
            android:label="@string/append_to_note"
            android:exported="true">

            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name="android.intent.category.DEFAULT" />
+0 −26
Original line number Diff line number Diff line
package it.niedermann.owncloud.notes;

import android.content.Intent;
import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import it.niedermann.owncloud.notes.exception.ExceptionHandler;
import it.niedermann.owncloud.notes.main.MainActivity;


/**
 * Created by stefan on 18.04.17.
 */
public class SplashscreenActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Thread.currentThread().setUncaughtExceptionHandler(new ExceptionHandler(this));

        final var intent = new Intent(this, MainActivity.class);
        startActivity(intent);
        finish();
    }
}
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.core.splashscreen.SplashScreen;
import androidx.core.view.GravityCompat;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
@@ -137,6 +138,8 @@ public class MainActivity extends LockedActivity implements NoteClickListener, A

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        SplashScreen.installSplashScreen(this);

        super.onCreate(savedInstanceState);

        mainViewModel = new ViewModelProvider(this).get(MainViewModel.class);
−3.15 KiB
Loading image diff...
Loading