nuhkoca
09/15/2022, 11:22 PMLazyList
?Aaron Waller
09/16/2022, 12:31 AMAsad Mukhtar
09/16/2022, 7:19 AMephemient
09/16/2022, 9:00 AMTextFieldValue
instead of String
which cannot hold composition stateMatti MK
09/16/2022, 9:07 AMKotlinLeaner
09/16/2022, 11:46 AMSimonas Brazauskas
09/16/2022, 1:25 PMLottieAnimation(
modifier = Modifier
.fillMaxWidth()
.weight(1f)
.heightIn(min = 200.dp),
composition = composition,
progress = { progress },
contentScale = ContentScale.Crop
)
Slackbot
09/16/2022, 2:26 PMreactormonk
09/16/2022, 3:25 PMreactormonk
09/16/2022, 3:28 PMAaron Waller
09/16/2022, 3:40 PMprivate val _userStateFlow: MutableStateFlow<UserStateModel?> = MutableStateFlow(UserStateModel())
val userStateFlow: StateFlow<UserStateModel?> = _userStateFlow
in my MainViewModel I’m collecting this state and i’m passing the user state down the hierarchy.
Before implementing nested navigation everything got updated accordingly but since I implemented nested navigation the change get’s lost somewhere inside my navigationGraph.
Anyone else faced this problem?Trevor Hackman
09/16/2022, 4:19 PMJorge Domínguez
09/16/2022, 9:37 PMval model = remember {
Model(
name = "John",
lastName = "Doe",
nationality = "Colombian",
type = Type.DEVELOPER
)
}
probably thinking about it too much but I'm not sure if re-instantiating the class on every recomposition has a significant costEwan
09/17/2022, 10:44 AMWindowCompat.setDecorFitsSystemWindows(window, false)
setContent {
val systemUiController: SystemUiController = rememberSystemUiController()
systemUiController.isStatusBarVisible = false
// draw here
The layout inspector shows a ViewStub of height 42dp:
DecorView
LinearLayout
action_mode_bar_stub - ViewStub height 42dp
content - FrameLayout
ComposeView
navigationBarBackground - View
statusBarBackground - View
Any ideas ?
UPDATE: I've found it draws correctly on an Android 12 & 13 emulators but not on Android 12 on a Samsung S10.Siyamed
09/17/2022, 5:31 PMmgrazianodecastro
09/18/2022, 2:05 AMShafayat Bin Mamun
09/18/2022, 2:37 AMMohan manu
09/19/2022, 8:03 AMAlex
09/19/2022, 2:51 PMSlackbot
09/19/2022, 2:52 PMchatterInDaSkull
09/19/2022, 6:13 PMLongPress
as just a click?Travis Griggs
09/19/2022, 8:46 PMobserveAsState
per the docs, but it doesn't seem to find that. Nor is it clear where to invoke that at...Stylianos Gakis
09/19/2022, 9:56 PMSurface
clips by default by the Shape
passed into it. Plus there doesn’t seem to be any Surface which provides flexibility there. Is there some specific reason why that is the case?
My use case is that I am rotating something inside a Surface (to get proper contentColor) and I am rotating that item in there meaning that while it’s at for example 45° the corners get clipped.
I guess I can make my own surface overload, but curious to see if I am missing some API and if not what the reason is for Surface
to always clip.Travis Griggs
09/19/2022, 10:21 PMAdam Brown
09/20/2022, 6:16 AMBasicTextField
, I can add a verticalScroll
modifier, but that breaks the built in scrolling. What I really want is to maintain it's built in scrolling, but be able to access that for the scroll bar. Looking in CoreTextField
the TextFieldScrollerPosition
isn't passed in as an argument, so it doesn't look to me like there is anyway I could access it, and I think all of the related functions and classes are marked internal. Anyone have any good ideas?Stylianos Gakis
09/20/2022, 7:25 AM@Immutable
@JvmInline
value class Foo(val values: Set<Int>)
And when generating compose metrics this gets read as unstable
. When removing the @JvmInline
and the value
from it, and keeping the @Immutable
(or @Stable
) it does in fact get inferred as stable looking at the generated files. This must be a bug right?melihgultekin
09/20/2022, 8:40 AM“A composable function is ‘skippable’ if Compose determines that it can completely skip calling a function”
“if Compose can’t be sure, it will always be recomposed when its parent composable is recomposed.”From those, I understand as compose will do recomposition if a parameter is defined as unstable but what I experienced was a bit different. I run compose metrics and have this output for a composable:
restartable skippable scheme("[androidx.compose.ui.UiComposable]") fun DummyScreen(
stable id: String
stable onClick: Function1<Boolean, Unit>
stable modifier: Modifier? = @static Companion
unstable style: DummyStyle? = @dynamic Companion.Default
unstable viewModel: DummyViewModel? = @dynamic hiltViewModel(null, $composer, 0, 0b0001)
)
Even though parameters are unstable, composable itself is marked as skippable. Is this expected?efemoney
09/20/2022, 8:43 AMBrush,horizontalGradient(
0.0f to cyan,
0.5f to cyan,
0.5f to lightBrown,
1.0f to lightBrown,
...
)
Guillaume Lardillier
09/20/2022, 9:04 AMJasmin Fajkic
09/20/2022, 12:08 PMJasmin Fajkic
09/20/2022, 12:08 PMBackHandler() {
if(loginState.currentView === LoginView.EMAIL_VIEW.name) {
loginViewModel.updateView(LoginView.LANDING.name)
}
else {
activity?.finish()
}
}
AmrJyniat
09/20/2022, 12:30 PMIan Lake
09/20/2022, 2:58 PMBackHandler(enabled = loginState.currentView === LoginView.EMAIL_VIEW.name) {
loginViewModel.updateView(LoginView.LANDING.name)
}
Jasmin Fajkic
09/20/2022, 2:59 PMIan Lake
09/20/2022, 4:29 PM