Patrick Kellison
02/15/2022, 10:48 PMChris Johnson
02/15/2022, 11:11 PMLazyListMeasure
but wanted to confirm this may be expected functionality before filing it. I currently need to observe the indexes of LazyListItemInfo
from my LazyListState and use them to key off of. When entering my screen for the first time, I would expect that that list would hold the list of visible items except their indexes are off. The first position of the list returned has index 1
when I think it should be 0
. If I scroll up at all (it doesn't change the scroll visibly but I assume it causes measure to hit again and then add index of 0) Is this expected functionality? Line #s in 🧵Chris Fillmore
02/16/2022, 4:22 AMCanvas
inside AnimatedContent
? It looks pretty bad; the canvas doesn’t animate and so ends up overlapping with other screens.Manojna Chintapalli
02/16/2022, 4:44 AMColton Idle
02/16/2022, 5:02 AMclickable
modifier on an OutlinedTextField
. Unfortunately the clickable ripple is a square shape vs filling in the rounded shape of the OutlinedTextField.
If I use clip(MaterialTheme.shapes.small)
then it looks perfect BUT the floating label will be cut off. Any other route I can take to make sure only the clickable ripple is clipped?K Merle
02/16/2022, 6:53 AMjava.lang.IllegalStateException: You cannot access the NavBackStackEntry's ViewModels after the NavBackStackEntry is destroyed.
if I switch navigation to fast. Anyone found a solution for it?Kata
02/16/2022, 8:01 AMconstraint layout
, linking the bottom view to the view on the top. This works fine until I decide not to display the top view for some reason. At this point the view at the bottom is not displayed at the right place. This makes sense since the Modifier.constrainAs
is not set up for the top view. What would be the correct solution for this issue?Vitaliy Zarubin
02/16/2022, 12:14 PMSamir Basnet
02/16/2022, 3:04 PMhfhbd
02/16/2022, 4:00 PMmutableStateOf<IntArray>
? Or does this not trigger a new recomposition because equals
uses the reference?Nick
02/16/2022, 4:04 PMy
location could change. how do I determine the y
location of the cursor?Lukasz Kalnik
02/16/2022, 4:56 PMDominik Seemayr
02/16/2022, 6:07 PMMutableState
, I can expose it as read-only value to other classes as State<String>
, just like:
private val _title = mutableStateOf("abc")
val title: State<String> = _title
Is there a way to do this with SnapshotStateList<>
too? How would I do this for example with:
private val _titles = mutableStateListOf<String>(...)
val titles: ??? = _titles
Thiago
02/16/2022, 7:13 PMSimon Stahl
02/16/2022, 11:30 PMtestTag
to the Text
node, but can i add it to Greeting
instead?
@Composable
fun Greeting(name: String) {
Text(
modifier = Modifier.semantics {
testTag = "My testTag"
},
text = "Hello $name!"
)
}
andrew
02/17/2022, 1:25 AMZoltan Demant
02/17/2022, 9:06 AMjames
02/17/2022, 9:07 AMandylamax
02/17/2022, 12:12 PM1.6.20-M1
?dimsuz
02/17/2022, 2:59 PMLazyColumn
is inside a android-view-based BottomSheetBehavior
+ CoordinatorLayout
. The thing is that when LazyColumn
is scrolled (scollOffset != 0) and then I release and drag down then whole bottom sheet is scrolled down. Expected behavior is that LazyColumn
scrolled to the zero offset and only then bottomsheet goes down.
Is this possible to achieve in this mix?Lukasz Kalnik
02/17/2022, 3:42 PMTextField
with prefilled text to set the cursor at the end of the text when it gains focus using LaunchedEffect { focusRequester.requestFocus() }
.
I store the text string itself in a ViewModel, but I don't want to keep the whole TextFieldValue
(including cursor position) inside the ViewModel.
It seems that the TextField
should be able to take care of its cursor position on its own. Is there a way to do it?Nat Strangerweather
02/17/2022, 4:24 PMjoadar
02/17/2022, 4:27 PMval listState = rememberLazyListState(Int.MAX_VALUE, Int.MAX_VALUE)
LaunchedEffect(messages) {
coroutineScope.launch {
listState.scrollToItem(Int.MAX_VALUE, Int.MAX_VALUE)
}
}
But my LazyColumn is like this:
LazyColumn(state = listState) {
items(messages) {...}
if (something) { item {} }
if (somethingElse) { item {} }
if (somethingElse2) { item {} }
}
And the issue is that it doesn’t scroll every time automatically to the latest item displayed (either from the update in items
or a single item
).
Am I doing something wrong?Marcin Wisniowski
02/17/2022, 5:01 PMNat Strangerweather
02/17/2022, 5:56 PMLazyVerticalGrid
I want these pieces to move outside of the grid. How can I do it? At the moment, they are moving but then disappear when they reach the edge of the LazyVerticalGrid
. 🧵Chris Fillmore
02/17/2022, 7:30 PMcontent://
uris? I’ve got a uri for an image from the camera roll. But trying to display it shows nothing, and I don’t get an error. It’s roughly what this user describes:
https://github.com/coil-kt/coil/discussions/833
Permission for read external storage is granted. Anyone else gotten stuck here? ThanksDavid Corrado
02/17/2022, 10:23 PMTim Almdal
02/17/2022, 10:33 PMmaxgdn
02/18/2022, 12:45 AMColton Idle
02/18/2022, 3:13 AMColton Idle
02/18/2022, 3:13 AMsetContent {
Scaffold(bottomBar = {
Box(Modifier.height(56.dp).background(Color.Blue).fillMaxWidth()) {
Text(text = "BottomBar")
}
}) {
val bottomSheetState = rememberModalBottomSheetState(initialValue = ModalBottomSheetValue.Hidden)
val scope = rememberCoroutineScope()
ModalBottomSheetLayout(sheetState = bottomSheetState, sheetContent = {
Column(Modifier.fillMaxSize().background(Color.Green)
) {
Text(text = "BottomSheet")
}
}) {
Column(Modifier.fillMaxSize().background(Color.Red)
) {
Text(text = "ScreenA")
Button(onClick = {
scope.launch {
bottomSheetState.show()
}
}) {
Text(text = "Open Bottom Sheet")
}
}
}
}
}
content
in a ScaffoldLayout
be drawn ontop of bottomBar
in any way?
private fun ScaffoldLayout(
isFabDocked: Boolean,
fabPosition: FabPosition,
topBar: @Composable () -> Unit,
content: @Composable (PaddingValues) -> Unit,
snackbar: @Composable () -> Unit,
fab: @Composable () -> Unit,
bottomBar: @Composable () -> Unit
) {
tad
02/18/2022, 5:10 AMNathan Castlehow
02/21/2022, 1:12 AMColton Idle
02/21/2022, 1:16 AM