parent
3dfc94b180
commit
694cc2a2ce
|
|
@ -66,11 +66,14 @@
|
|||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
tools:replace="android:allowBackup,android:supportsRtl"
|
||||
tools:targetApi="33">
|
||||
|
||||
<activity
|
||||
android:name="com.img.rabbit.MainActivity"
|
||||
android:theme="@style/SplashTheme"
|
||||
android:screenOrientation="portrait"
|
||||
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask">
|
||||
android:launchMode="singleTask" >
|
||||
<intent-filter tools:ignore="AppLinkUrlError">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.img.rabbit
|
|||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.activity.ComponentActivity
|
||||
|
|
@ -96,13 +97,16 @@ import kotlin.system.exitProcess
|
|||
class MainActivity : ComponentActivity(), LoadingCallback {
|
||||
private lateinit var generalViewModel: GeneralViewModel
|
||||
@OptIn(DelicateCoroutinesApi::class, ExperimentalPermissionsApi::class)
|
||||
@SuppressLint("UnrememberedMutableState", "CoroutineCreationDuringComposition")
|
||||
@SuppressLint("UnrememberedMutableState", "CoroutineCreationDuringComposition",
|
||||
"SourceLockedOrientationActivity"
|
||||
)
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
val splashScreen = installSplashScreen()
|
||||
super.onCreate(savedInstanceState)
|
||||
// 启用Edge-to-Edge模式(沉浸模式)
|
||||
enableEdgeToEdge()
|
||||
|
||||
|
||||
setContent {
|
||||
val coroutineScope = rememberCoroutineScope()
|
||||
var showSplash by remember { mutableStateOf(false) }
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@ import kotlinx.coroutines.launch
|
|||
import org.json.JSONObject
|
||||
import kotlin.collections.chunked
|
||||
|
||||
@SuppressLint("UnrememberedMutableState", "MutableCollectionMutableState")
|
||||
@SuppressLint("UnrememberedMutableState", "MutableCollectionMutableState",
|
||||
"SourceLockedOrientationActivity"
|
||||
)
|
||||
@Composable
|
||||
fun HomeScreen(
|
||||
navController: NavHostController,
|
||||
|
|
|
|||
Loading…
Reference in New Issue