PHondogo
08/15/2021, 4:11 PMColton Idle
08/15/2021, 5:41 PMBackHandler { myLambda() }
Even though the bottom sheet is showing, my backHandler still get triggered. What's the "right" way to prevent this?Florian
08/15/2021, 6:44 PMderiveStateOf
to calculate statisticsFoTask
or is that not the correct approach?
@Composable
private fun TaskWithStatisticsList(
tasks: List<Task>,
taskStatistics: List<TaskStatistic>,
onTaskDetailsClicked: (Task) -> Unit,
modifier: Modifier = Modifier
) {
LazyColumn(
contentPadding = PaddingValues(bottom = 50.dp),
modifier = modifier
) {
items(tasks) { task ->
val statisticsForTask = taskStatistics.filter { it.taskId == task.id }
TaskWithStatisticsItem(
task = task,
statistics = statisticsForTask,
onTaskDetailsClicked = onTaskDetailsClicked
)
Divider()
}
}
}
Mehmet Peker
08/15/2021, 9:21 PMCan
08/16/2021, 9:15 AMMaxUt
08/16/2021, 9:21 AMcarbaj0
08/16/2021, 10:10 AMcom.google.accompanist:accompanist-pager:0.16.1
, question:
how can i implement a listener triggered when change of page?Pedro Joya
08/16/2021, 10:11 AMRE
08/16/2021, 10:42 AMMaxUt
08/16/2021, 11:39 AMziv kesten
08/16/2021, 12:08 PMColton Idle
08/16/2021, 3:21 PMdimsuz
08/16/2021, 4:52 PMRow
of `Button`s and then in some situations I pass it fillMaxWidth
modifier and I want buttons to expand equally inside it, but if no fillMaxWidth
modifier is used on that component I want them to behave like "wrap content" would, i.e. be of their inrinsic width.
Is this possible to achive easily or should I pass some kind of custom parameter to my component for it to change layout accordingly?Justin Yue
08/16/2021, 5:24 PMbrandonmcansh
08/16/2021, 8:28 PMVerticalGrid
or a LazyVerticalGrid
? I see some examples of it working using LazyListState for a Column, but none for a gridColton Idle
08/16/2021, 8:44 PM@HiltViewModel
class MyScreenViewModel
@Inject
constructor(var navEvent: (String) -> Unit)
which makes sure that this navEvent is passed in.
fun MyScreen(viewModel: MyScreenViewModel = hiltViewModel(//how do I pass something in))
Is there an easy way to pass in a lambda? I've passed arguments into viewModels with compose before but hiltViewModel did all the heavy lifting and exposed the argument via savedStateHandle. Can I somehow pass this lambda into my savedStateHandle? I'd be okay with that.zhagnfei
08/17/2021, 2:32 AMNathan Castlehow
08/17/2021, 3:16 AMNapa Ram
08/17/2021, 8:01 AMrajesh
08/17/2021, 9:38 AMChachako
08/17/2021, 9:39 AMdesktop
support the same effect by skija, then is it possible to be compatible with the version below android 12
(eg, through RenderScript or Vulkan)?Anastasia Rozovskaya
08/17/2021, 10:13 AMmodifier = Modifier(background = AppTheme.colors.background)
but in dark theme it shows background color for light theme.
Here is a theme implementation
AppColors.kt
https://gist.github.com/llama-0/9b92e8eed30fe65bbdc3b47bf57a1a49
AppTypography.kt
https://gist.github.com/llama-0/99f58df22ae9dbb8adb55dea410136c0
AppTheme.kt
https://gist.github.com/llama-0/4c65f4aa7fdccf8b35ca089f6b30fac1
Any thoughts?rsktash
08/17/2021, 10:48 AMelye
08/17/2021, 11:30 AMFlorian
08/17/2021, 12:01 PMdavid.bilik
08/17/2021, 12:51 PMnavigation-compose
with viewmodels scoped to NavBackStackEntry
to pass complex parcelable arguments since it’s not possible natively from list to detail screen. It works fine but when I press button it looks like the detail screen is “requested” again in composable
call but the previous back stack entry is null. Details in 🧵brandonmcansh
08/17/2021, 1:57 PMmattinger
08/17/2021, 3:05 PMdimsuz
08/17/2021, 4:18 PMTextField
and if I type few words in it and then press and hold Backspace on hw keyboard, in the end cursor goes out of sync and few symbols remain. Same thing happens in "forward" mode: if I type really fast.Deepak Gahlot
08/17/2021, 4:54 PMjava.lang.IllegalArgumentException: SavedStateProvider with the given key is already registered
I'm trying to launch the file explorer for the user to pick a file, and then when the user clicks to return back to the compose screen . I'm getting this error, this was not there before not sure what has changedDeepak Gahlot
08/17/2021, 4:54 PMjava.lang.IllegalArgumentException: SavedStateProvider with the given key is already registered
I'm trying to launch the file explorer for the user to pick a file, and then when the user clicks to return back to the compose screen . I'm getting this error, this was not there before not sure what has changedval registerTakeFile = rememberLauncherForActivityResult(
ActivityResultContracts.OpenDocument()
) { uri ->}
Colton Idle
08/18/2021, 1:52 AMDeepak Gahlot
08/18/2021, 4:10 AM