Код: Выделить всё
private val LightColorScheme = lightColorScheme(
primary = Primary
)
Код: Выделить всё
@Composable
fun MarkettrackerTheme(
content: @Composable () -> Unit
) {
MaterialTheme(
colorScheme = LightColorScheme,
typography = MarketTrackerTypography,
content = content
)
}
Код: Выделить всё
setContent {
MarkettrackerTheme {
MainScreen(
onProductClick = {
NavigateAux.navigateTo(this)
}
)
}
}
Код: Выделить всё
@Composable
fun MainScreen() {
val navController = rememberNavController()
var selectedIndex by rememberSaveable { mutableIntStateOf(0) }
Scaffold(
containerColor = Grey,
bottomBar = {
// NavBar...
}
) {
NavHost(
navController = navController,
startDestination = Destination.HOME.route,
enterTransition = { fadeIn(tween(400)) },
exitTransition = { fadeOut(tween(200)) },
modifier = Modifier.padding(it)
) {
composable("home") {
PullToRefreshLazyColumn(
isRefreshing = isRefreshing,
onRefresh = {
scope.launch {
// logic to refresh products...
}
}
) {
if(isLoading) LoadingIcon()
else LazyColumn(...)
}
}
Код: Выделить всё
Column(
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
Image(
painter = painterResource(id = R.drawable.mt_logo),
contentDescription = "LoadingIcon",
modifier = Modifier.rotate(rotation)
)
text?.let {
Text(text = it) // this changes from black to white in almost 1s
}
}
Я пробовал жестко запрограммировать цвет текста, используя стили, окружая текст темой, но ничего не помогает, в течение мс он отображается черным, а затем белым.
Подробнее здесь: https://stackoverflow.com/questions/783 ... ndroid-app
Мобильная версия