rajesh
05/27/2021, 4:59 PMInk
05/27/2021, 5:21 PMdimsuz
05/27/2021, 5:24 PMButton {
Text(...)
Icon() // 24x24dp
}
Altough button content is a RowScope
with verticalArrangement = CenterVertical
, Text
seems to not be vertically centered, you can see it's shifted down compared to Icon. Why is that and how can I fix this?André Thiele
05/27/2021, 6:26 PMZach Klippenstein (he/him) [MOD]
05/27/2021, 6:50 PMDaniel
05/27/2021, 8:48 PMButton
with a CircleShape
the result is oblong. Based on images online this seems like not the expected behavior. Am I missing something obvious?tad
05/27/2021, 9:07 PMColton Idle
05/27/2021, 9:27 PMclass DomainToComposeConverter {
@Composable
fun from(domainModel: MyDomainModel) {
Now I don't think this is really idiomatic kotlin/compose because 1. from
breaks the rule "Composable functions that return Unit should start with an uppercase letter" 2. Would this be better as an "object"/singleton or do you all think that this should just be an extension function on MyDomainModel
?Zan Skamljic
05/28/2021, 6:47 AMMjahangiry75
05/28/2021, 9:53 AMBox
than_
05/28/2021, 10:23 AMTo pass the argument to the destination, you need to add the value to the route in place of the placeholder in the call to `navigate`:
How would one pass parcelable argument to a route? Receiving is straightforward. Passing seems not.navController.navigate("profile/user1234")
Alex
05/28/2021, 11:04 AMHeikki Rauhala
05/28/2021, 11:53 AM@Composable
annotations are added. Is this a known issue, am I doing something stupid, or should I just report a bug?brandonmcansh
05/28/2021, 11:57 AMbackgroundColor
with OutlinedTextFields? I can't get it to apply for some reasonPaul Woitaschek
05/28/2021, 12:17 PMdimsuz
05/28/2021, 12:20 PMColumn {
Button(modifier = Modifier.fillMaxWidth()) {
Icon()
Spacer(weight = 1f)
Text()
Spacer(weight = 1f)
}
}
This works great, but now I also have cases where I want to remove fillMaxWidth()
and I want both spacers to be equal to 0
width when laid out.
I.e. without fillMaxWidth
I want this button to behave like "wrap_content" in old times: icon + text, centered in column, no space between them. Currently they still stretch, so removing fillMaxWidth
has no effect and button stretches to full column width. Can this be done?Spikey Sanju
05/28/2021, 12:47 PMreuse
Custom OutlineTextField
composable?.
For ex - I have same repeating OutlineTextField
component imagine 4 - 5 fields. Only thing I need to change is to remember state
for each Input field. How to achieve this?
Same I need to achieve for Sliders
This is component 👇Kyant
05/28/2021, 12:49 PMLazyCoulmn
on Android 12?jaran
05/28/2021, 1:06 PMmergeDescendants = true
does not work in the snippet below? VO reads both the RadioButton and Text.julioromano
05/28/2021, 1:06 PMnavigation-compose
I’ve noticed it’s possible to navigate to a nested destination without first navigating to its nested nav graph.
Please see code in thread.Paul Woitaschek
05/28/2021, 1:09 PMCompositionLocalProvider(LocalContext provides LocalContext.current.withTheme(R.style.MyTheme)) {
Image(
modifier = Modifier.align(Alignment.TopEnd),
painter = painterResource(id = R.drawable.my_image), contentDescription = null
)
}
julioromano
05/28/2021, 1:53 PMTextField
?Daniel
05/28/2021, 2:18 PMLaunchedEffect(mapbox) {
val scope = this
val map = mapbox.awaitMap();
map.addOnCameraIdleListener {
Timber.i("This is called")
scope.launch {
Timber.i("This is never called")
repo.setMapPosition(map.cameraPosition)
}
}
Timber.i("This is also called")
}
Vitaliy Zarubin
05/28/2021, 2:35 PM@Query("SELECT * FROM ModelRepo WHERE id = :id")
fun getModel(id: Long): Flow<ModelRepo>
ViewModel
val findByIdRepo: (Long) -> Flow<ModelRepo?> = { id -> dataRepo.getModel(id).distinctUntilChanged() }
@Composable
val model: ModelRepo? by viewModel.findByIdRepo(repoId).collectAsState(initial = null)
André Thiele
05/28/2021, 2:57 PMBilly Newman
05/28/2021, 3:49 PMval scope = rememberCoroutineScope()
val scaffoldState = rememberScaffoldState()
That is not going to happen as these are not “rememberSavable”Abdalla Hassanin
05/28/2021, 4:35 PMBarry Fawthrop
05/28/2021, 5:01 PMZan Skamljic
05/28/2021, 5:14 PMAkram Bensalem
05/28/2021, 5:15 PMAkram Bensalem
05/28/2021, 5:15 PMste
05/29/2021, 11:55 AMModifier
.pointerInput(Unit) { detectDragGesture ... }
.pointerInput(Unit) { detectTapWhatsoever ... }
Akram Bensalem
05/29/2021, 12:24 PM