Abhishek Dewan
12/28/2021, 6:24 PMTextField
. I have a sort of working solution using a custom VisualTransformation
however trying to see if there is a different way of achieving this.Tim Malseed
12/29/2021, 3:57 AMassertIsDisplayed()
is failing. I’m wondering if it’s possible that there could be a problem with these compose assertions running against a headless emulator?
The tests seem to run fine on various emulators when I run them locally. Just not quite sure where to look to figure this one out..Gumiku
12/29/2021, 8:51 AMBox1(){
Box2(){
}
}
If there are two boxes in the screen, how can I detect touch event in Box1 but consume the event in Box2?Kulwinder Singh
12/29/2021, 9:48 AM@HiltViewModel
class AboutVM @Inject constructor(
private val profile: Profile,
) : ViewModel() {
...
}
How profile
can be passed ?
while creating viewmodel like below
val vm = hiltViewModel<AboutVM>()
Florian Walther (live streaming)
12/29/2021, 12:26 PMFlorian Walther (live streaming)
12/29/2021, 1:14 PMSwipeToDismiss
composable?Bradleycorn
12/29/2021, 4:36 PMAntoine Gagnon
12/29/2021, 6:59 PMpointerInput
Modifier on a piece of text.
I use it to get the click position and do some things with it, but my issue is that is override the default click behaviour as well.
In my case, this means that with a SelectionContainer
I can select my text, but clicking to deselect doesn’t work, the pointerInput
consumes the click and doesn’t “transmit” it.
Any idea on how to do that? Use the position and still transfer the click?theapache64
12/29/2021, 8:00 PMBrian Donovan
12/29/2021, 8:06 PMBrian Donovan
12/29/2021, 9:33 PMFlorian Walther (live streaming)
12/30/2021, 11:57 AMLaunchedEffect
by wrapping it inside a launch
block? Otherwise the showSnackbar
method blocks the coroutine because it's a suspend fun
LaunchedEffect(Unit) {
viewModel.events.collect { event ->
when (event) {
is RewardListViewModel.Event.ShowUndoRewardSnackbar -> {
launch {
val snackbarResult = scaffoldState.snackbarHostState.showSnackbar(
message = context.getString(R.string.reward_deleted),
actionLabel = context.getString(R.string.undo),
)
if (snackbarResult == SnackbarResult.ActionPerformed) {
viewModel.onUndoDeleteRewardConfirmed(event.reward)
}
}
Unit
}
is RewardListViewModel.Event.NavigateToEditRewardScreen -> {
navController.navigate(AddEditRewardScreenSpec.buildRoute(event.reward.id))
}
}.exhaustive
}
}
Utkarsh Tiwari
12/30/2021, 2:30 PMAlexander Suraphel
12/30/2021, 3:21 PMandroidx.activity:activity-compose
dependency if I have one activity application? What is the dependency for?myanmarking
12/30/2021, 4:32 PMMarcin Wisniowski
12/30/2021, 6:34 PMAndy Himberger
12/30/2021, 7:29 PMmyanmarking
12/30/2021, 8:18 PMJamie
12/31/2021, 3:30 AMcopy()
method or equivalent to replicate the samples when invoking value.reduce {}, and the widget doesn't recompose when the observed state
value changes.
What am I missing?
EDIT: creating a wrapper data class
to hold my sealed class
did the trick to make it play nice, though very much open to suggestions if there's a better way to handle this!loloof64
12/31/2021, 9:20 AM@Composable
code, but don't know what. Because when I rotate the device, the value of pageIndex
switches between two values instead of keeping the same value. More in 🧵theapache64
12/31/2021, 12:27 PMparentLayoutCoordinates.size
is 0 x 0
for the first few items? More inside 🧵FunkyMuse
12/31/2021, 12:33 PMmyanmarking
12/31/2021, 2:01 PMChris Fillmore
12/31/2021, 4:20 PM@Preview
rendering. This shows up as “Render problem” in the preview pane:
java.lang.NullPointerException: Parameter specified as non-null is null
The parameter referenced in the message is just a text: String
which gets passed to a text composable Text(text = text)
Afzal Najam
12/31/2021, 8:13 PMLazyColumn
, second one is just Column
with verticalScroll
modifier.
Edit: Looks like this is related to d-pad navigation because when I swipe using scrcpy
, all the rows are there.Bojie Jiang
01/01/2022, 3:08 AMVivek Sharma
01/01/2022, 11:32 AMModifier.pointerInput(Unit) {
detectTransformGestures { centroid, pan, zoom, rotation ->
offset += pan
scale *= zoom
}
}
I am zooming the image and I need to know when the zoom drag is ended like we removed the fingers?
Further info 👇rsktash
01/01/2022, 4:30 PMJamie
01/02/2022, 4:17 AMpackageDeb
Gradle task instead builds a MacOS appSimon Lin
01/02/2022, 2:31 PMRecipe
compose to show Recipe
data.
Is it good to use the same name on both compose fun and data class?