Skip to content

Commit

Permalink
feat: Add LaunchActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX authored and KevinBoulongne committed Nov 21, 2024
1 parent dfe2f02 commit 2264d54
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
5 changes: 4 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
</provider>

<activity
android:name=".ui.MainActivity"
android:name=".ui.LaunchActivity"
android:exported="true"
android:theme="@style/Theme.AppStarting">
<intent-filter>
Expand All @@ -66,6 +66,9 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity android:name=".ui.MainActivity" />

<activity android:name=".ui.NewTransferActivity" />
</application>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Infomaniak SwissTransfer - Android
* Copyright (C) 2024 Infomaniak Network SA
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.infomaniak.swisstransfer.ui

import android.annotation.SuppressLint
import android.content.Intent
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen

@SuppressLint("CustomSplashScreen")
class LaunchActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen()
super.onCreate(savedInstanceState)
startActivity(Intent(this, MainActivity::class.java))
finish()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import androidx.activity.viewModels
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.infomaniak.multiplatform_swisstransfer.common.models.Theme
import com.infomaniak.swisstransfer.ui.screen.main.MainScreen
Expand All @@ -39,7 +38,6 @@ class MainActivity : ComponentActivity() {
private val settingsViewModel: SettingsViewModel by viewModels()

override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen()
enableEdgeToEdge()
super.onCreate(savedInstanceState)
setContent {
Expand Down

0 comments on commit 2264d54

Please sign in to comment.