Peter
12/05/2022, 2:36 AMsetDecorFitsSystemWindows(window, false)
setSoftInputMode(SOFT_INPUT_ADJUST_RESIZE)
inside the activity, it works as expected .But my application contains a lot of fragment , If I setDecorFitsSystemWindows and setSoftInputMode inside the fragment it doesn't work,the text Text goes below the keyboard .I tried both Compose 1.3 and accompanist insets library.
Someone already asked https://issuetracker.google.com/issues/192043120#comment15
Anyone know how to fix it.Tim Malseed
12/05/2022, 3:03 AMNavType
in Jetpack Navigation.
You shouldn’t have to lean on this too often, as it’s not considered good practice to pass structured data via navigation arguments if you’re using route-based navigation. Instead, it’s better to pass an identifier for your data, and then go and retrieve it from your repository - if you can.
But, if your data isn’t uniquely-identifiable, or it only really exists at the UI layer, then there are times when it can be useful to serialize your structured data and pass it around. That’s where custom NavType
comes in handy - and there’s a little explanation of how to do it, buried in this guide to the navigation DSL:
https://developer.android.com/guide/navigation/navigation-kotlin-dsl#custom-typesMohan manu
12/05/2022, 3:27 AMBryan Herbst
04/14/2021, 2:28 PMDaniele Segato
12/05/2022, 9:21 AMKamilH
12/05/2022, 9:35 AMSnapFlingBehavior
to snap only to specific items (positions)? I want to snap only to stickyHeaders
, not any item on the list.david.bilik
12/05/2022, 10:52 AMBox
and a single Box
as a child. I have a long press listener on the parent and normal click listener on a child. My problem is - when I long press the child, the parent long press listener is not fired. Is there any way how to achieve this without specifying the long press listener on the child as well?Elio Maroun
12/05/2022, 11:00 AMLuis Daivid
12/05/2022, 11:05 AMColumn(
modifier = Modifier.verticalScroll(scrollState)
) {
Box(modifier = Modifier.fillMaxWidth().weight(1f) {
LogoImage()
}
Buttons(modifier = Modifier.fillMaxSize())
}
I have textfields inside Buttons, but when focused, the keyboard just hides the elements. How should I implement it?AmrJyniat
12/05/2022, 12:56 PMImage()
Composable itself?theapache64
12/05/2022, 8:07 PMdata class Car(val name: String)
@Composable
private fun Test() {
var car by remember { mutableStateOf(Car("Audi")) }
var remCar = remember { car }
LaunchedEffect(car) {
remCar = car
}
println("remCar is `${remCar.name}`")
Button(
onClick = {
car = Car("BMW - ${System.currentTimeMillis()}")
}
) {
Text("CHANGE CAR")
}
}
Pressing CHANGE CAR
button always prints remCar is Audi
Why it’s not printing BMW
? 🤔eygraber
12/05/2022, 8:30 PMinternal
? For example, all of the tokens, things like ButtonColors
, etc... Would be helpful to have access to them in some scenarios, especially since they are read only anyways.Jaime
12/05/2022, 10:09 PMrememberSwipeableState
to leave the swipe in the initial statemattinger
12/05/2022, 10:14 PMprivate fun snapshot(content: @Composable () -> Unit) {
paparazzi.snapshot {
XfinityTheme {
Surface {
content()
}
}
}
}
This ends up screenshotting the screen where the dialog will be over, but not the actual dialog. Not sure if there’s a way to have paparazzi delay the snapshot or not.Zach
12/05/2022, 11:04 PMpopBackStack
on a screen with a text field. For some reason on back press, either via the nav bar back button or an onscreen back button calling popBackStack
, the screen kind of just flashes and then the keyboard flashes, but it doesn’t go to the previous composable. If I spam the back button, it does eventually return to the previous screen. How do I get around this and have just 1 press of back button go to the previous screen without using navigate()
?Noop
12/06/2022, 6:48 AMrememberLauncherForActivityResult(
contract = ActivityResultContracts.GetMultipleContents()
)
I got below style uri, but I want absolute path, How do I get?
<content://com.android.providers.media.documents/document/image%3A1000080935>
Slackbot
12/06/2022, 9:06 AMMikołaj Kąkol
12/06/2022, 9:36 AMLayoutNode
? My usecase is that drawing params (shader) has change but compose don't know about that. So I would like to force a redraw on next frame a composable function.Tower Guidev2
12/06/2022, 12:01 PMMaciej S
12/06/2022, 3:56 PMDaniele Segato
12/06/2022, 5:33 PMBox(Modifier.fillMaxWidth) {
Header()
Footer(Modifier.align(Alignement.BottomCenter))
Main(
modifier = Modifier.fillMaxWidth()
.verticalScroll(state)
.padding(headerFooterPadding)
)
}
Is it intended for the scrollable container to block clicks happening in Header and Footer?
What are my options?Sebastian Kürten
12/06/2022, 5:34 PMSebastian Kürten
12/06/2022, 5:36 PMZach
12/06/2022, 7:04 PMFocusRequester.createRefs()
still require using remember
inside of a composable? Curious how to use this APIKotlinLeaner
12/06/2022, 8:30 PMErlan Amanatov
12/07/2022, 4:51 AMCheckbox
and FilterChip
default colors.
So for Checkbox
colors are implemented as
object CheckboxDefaults {
fun colors(..) : CheckboxColors {
return remember (...) { DefaultCheckboxColors(...) }
}
}
and for FilterChip
default colors are implemented as
object ChipDefaults {
fun filterChipColors(...) : SelectableChipColors {
return DefaultSelectableChipColors(...)
}
}
My question is: Why was remember
used in one of the cases and not in the other one?Zaki Shaikh
12/07/2022, 5:53 AModay
12/07/2022, 9:31 AMjulioromano
12/07/2022, 10:19 AM