Compose: add background color to host to avoid blink between nav
This commit is contained in:
parent
11b74c0279
commit
b46d80fa35
1 changed files with 4 additions and 0 deletions
|
|
@ -6,8 +6,11 @@ import android.os.Bundle
|
|||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.activity.viewModels
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import com.ramcosta.composedestinations.DestinationsNavHost
|
||||
import com.ramcosta.composedestinations.rememberNavHostEngine
|
||||
import io.element.android.x.designsystem.ElementXTheme
|
||||
|
|
@ -42,6 +45,7 @@ private fun MainScreen(viewModel: MainViewModel) {
|
|||
}
|
||||
|
||||
DestinationsNavHost(
|
||||
modifier = Modifier.background(MaterialTheme.colorScheme.background),
|
||||
engine = engine,
|
||||
navController = navController,
|
||||
navGraph = NavGraphs.root,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue