ti4n
12/25/2022, 6:40 AMKarthick
12/25/2022, 7:11 AMconfirmStateChange
not using the latest state. I want to disable state change while loading. My code is like this.
val uiState = viewModel.uiState.value
Logger.d(SNAP_TAG, "UISTATE $uiState")
val bottomSheetState = rememberBottomSheetState(
initialValue = BottomSheetValue.Expanded,
confirmStateChange = {
Logger.d(SNAP_TAG, "UISTATE $uiState")
!(uiState is UiState.Loading)
}
)
But confirmStateChange
lambda always have uiState as Loading, even-though state changed to Success. My logs are like this
UISTATE com.example.state.UiState$Loading@f06c50e
UISTATE Success
UISTATE com.example.state.UiState$Loading@f06c50e
UISTATE com.example.state.UiState$Loading@f06c50e
Debdut Saha
12/25/2022, 7:12 AMCLOVIS
12/25/2022, 6:02 PMGonzalo Renedo
12/26/2022, 3:39 PMGonzalo Renedo
12/26/2022, 4:43 PMfilipegoncalves
12/26/2022, 7:25 PMHorizontalPager
be a “Circular/Infinite” list ?
By “Circular/Infinite” I mean that in a list of 10 items, when I reach the end of the list`(index 9)` it would show me the first element (index 0)
again right after
Any ideas?ursus
12/26/2022, 10:12 PMSquare
, then I think the squareness should be a internal detail of the Square composable (Modifier.aspectRatio)
However, the width its supposed to have, should come from the parent, since Square to be generic, doesnt know how to be usesnuhkoca
12/26/2022, 11:13 PMbenchmark
module throws the exception below when executing ./gradlew connectedBenchmarkAndroidTest -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
task
symbol: class DeveloperSettingsModule
error: ComponentProcessingStep was unable to process 'path.to.package.core.di.ApplicationComponent' because '<error>' could not be resolved.
Can somebody please help me figure out what’s wrong with Dagger? I am confused.chanjungskim
12/27/2022, 2:04 AManimatedDialog
. Is this normal way or does this have any problem or is there any better solution to solve this issue?
fun NavGraphBuilder.animatedDialog(
route: String,
arguments: List<NamedNavArgument> = emptyList(),
deepLinks: List<NavDeepLink> = emptyList(),
enter: EnterTransition = fadeIn() + expandIn(),
exit: ExitTransition = shrinkOut() + fadeOut(),
dialogProperties: DialogProperties = DialogProperties(),
content: @Composable (NavBackStackEntry) -> Unit
) {
addDestination(
Destination(
provider[AnimatedDialogNavigator::class],
enter = enter,
exit = exit,
dialogProperties,
content
).apply {
this.route = route
arguments.forEach { (argumentName, argument) ->
addArgument(argumentName, argument)
}
deepLinks.forEach { deepLink ->
addDeepLink(deepLink)
}
}
)
}
chanjungskim
12/27/2022, 2:06 AMYves Kalume
12/27/2022, 8:40 AMandroid:windowSoftInputMode="adjustResize"
in my Manifest file ? (i don’t want my layouts to be resized when the keyboard is on the screen but i just want my Textfield to be visible)Shakil Karim
12/27/2022, 8:40 AMGiang
12/27/2022, 12:27 PMjossiwolf
12/27/2022, 2:43 PMColton Idle
12/27/2022, 6:40 PMursus
12/27/2022, 8:48 PMdrawBehind { .. .drawRect … }
but how do I get the height of statusbar? I see the statusBarPadding
but that’s modifier. Is there a way to read the actual integer value?sindrenm
12/27/2022, 8:57 PMLazyVerticalGrid
and LazyHorizontalGrid
? I could just roll with a Column
of `Row`s, but I like the GridCells.Adaptive
approach of determining how many items in each Row
.Justin Tarnoff
12/27/2022, 9:58 PMActivityNavigatorDestinationBuilder
, I'm able to access the action, data, and dataPattern used to create the intent, but I don't see a way to let me set flags like FLAG_ACTIVITY_NEW_TASK
or FLAG_ACTIVITY_CLEAR_TOP
. How can I navigate back to Activity 0 and clear the back stack?ursus
12/27/2022, 11:04 PMPaddingValues
together?
LazyColumn(
contentPadding = WindowInsets.navigationBars.asPaddingValues() + PaddingValues(16.dp),
I need to add navigationbar inset + my padding togetherTin Tran
12/28/2022, 2:27 AManimateContentSize
in the LazyColumnlouiscad
12/28/2022, 5:18 AMlouiscad
12/28/2022, 5:19 AMPardip
12/28/2022, 8:53 AMbottomSheet
. Adding a verticalScroll(rememberScrollState())
modifier to the WebView (AndroidView
) or parent composable inside BottomSheet causes some page contents/images to not load for unknown reasons. I also tried the accompanist web view inside the bottom sheet and obtained the same results (some page contents or images are not showing up). But when I don’t use BottomSheet, those pages/images appear. Is there a way to handle it?Issa
12/28/2022, 9:46 AMeygraber
12/28/2022, 11:52 AMUpdate kotlin monorepo to v1.8.0
When will compose support Kotlin 1.8.0 :trollface:KotlinLeaner
12/28/2022, 3:16 PMYariv Ziporin
12/28/2022, 7:04 PMIssa
12/28/2022, 10:22 PMobject CustomVerticalArrangement : Arrangement.Vertical {
override fun Density.arrange(totalSize: Int, sizes: IntArray, outPositions: IntArray) {
var current = 0
sizes.forEachIndexed { index, it ->
when (index / 3) {
0 -> outPositions[index] = current + 10
1 -> outPositions[index] = current + 20
else -> outPositions[index] = current + 5
}
current += it
}
}
}
I pass it over later to my LazyVerticalGrid
LazyVerticalGrid(
modifier = Modifier.fillMaxSize(),
columns = GridCells.Fixed(3),
contentPadding = PaddingValues(start = 70.dp, end = 70.dp, top = 75.dp, bottom = 40.dp),
// TODO: consider custom vertical arrangement
verticalArrangement = CustomVerticalArrangement,
horizontalArrangement = Arrangement.spacedBy(10.dp)
) { ... }
The code is never called I believe or it’s jus that LazyGrid doesn’t consider it and use the default spacing 0.dp
(debugger breakpoint never reached BTW)
Am I doing something wrong or this is a bug?Konyaco
12/29/2022, 4:30 AMKonyaco
12/29/2022, 4:30 AMromainguy
12/29/2022, 4:43 AMKonyaco
12/29/2022, 5:04 AM