RE
06/05/2021, 3:17 PMSaiedmomen
06/05/2021, 4:29 PMBottomSheetScaffoldSample
with initial value of bottomsheetstate set to expanded.MBegemot
06/05/2021, 4:43 PMMBegemot
06/05/2021, 6:35 PMPatrick Duarte
06/05/2021, 6:56 PMYASAN
06/06/2021, 12:41 AM<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
to my styles.xml
so the notch background would look right, but I cant find the compose version for controlling this.Colton Idle
06/06/2021, 3:29 AMPablo Carbajal
06/06/2021, 6:46 AMImage(
painter = painterResource(id = R.drawable.logo),
contentDescription = null
)
I saw that in the docs, but it does not work. Do assets usually go in /res/drawable ? I saw another google guide saying to make a new folder called "assets"Namig Tahmazli
06/06/2021, 8:56 AMSpikey Sanju
06/06/2021, 9:10 AMbeta-08
& Compose nav graph
dependencies. I’m not able to scope my viewmodel
to the nav graph component
🙇♂️🏻
Code sample in thread 👇Zan Skamljic
06/06/2021, 9:35 AMste
06/06/2021, 9:36 AMstart.linkTo(anchor = parent.start, margin = 36.dp)
leads to the first image (start margin is okay, but I'd like to set a end margin too)
But when adding end.linkTo(anchor = parent.end, margin = 36.dp)
, it leads to the second image, where none of the margin is okay because the text is too large.
What can I do? Adding a padding
won't work because the lower text (0
) wouldn't be aligned to the upper textSpikey Sanju
06/06/2021, 10:15 AMCombinedClickable
takes 1-2 seconds
to perform action?. Is there any workaround solution for this?
Code in Thread 🙇Zan Skamljic
06/06/2021, 11:27 AMNana Vong
06/06/2021, 12:35 PMSurface {
darkMode.value = !darkMode.value
}
this way not recompose:
Surface {
thread {
darkMode.value = !darkMode.value
}
}
nglauber
06/06/2021, 1:18 PMHachemi Hamadi
06/06/2021, 2:02 PMKulwinder Singh
06/06/2021, 3:06 PMApm29
06/07/2021, 3:14 AMRavi
06/07/2021, 8:31 AMhttps://youtu.be/B1u7JZ1rLyE?t=453▾
JulianK
06/07/2021, 1:36 PMRE
06/07/2021, 3:35 PMrobnik
06/07/2021, 7:43 PMLuis Mierez
06/07/2021, 9:51 PMLazyColumn
without the paging library and I’ve come up with something that works but just want a sanity check since I’m still new to compose. Code in threadMayank Saini
06/08/2021, 5:48 AMplaceholder
and leadingIcon
are not properly aligned. placeholder
is aligned to the top while the leadingIcon
is in centre. I want both of them to be in centre. What is the solution for this?james
06/08/2021, 7:08 AMLazyColumn
. It receives the list of items from a flow in a parent composable via collectAsState
. When the flow emits a new list of values, the composable function containing the LazyColumn
appears to get called with the updated list of items. However, unless the parent of the LazyColumn
composable is recomposed itself (which it it does not appear to be even though the collectAsState
appears to being emitting new values to the child composable) the list UI does not update with the latest list state. This behavior doesn't appear to occur in Beta07. Anyone else encountered this or have any ideas?Adrian Landborn
06/08/2021, 7:08 AMCheckbox
is 24x24dp which is no-no, needs to be at least 48x48dp to pass the checks. So my approach is to combine Checkbox
with Text
to increase the width and add som internal padding to fix the height. Also add the same onClick
on both items. But this does not work. Any advice? As soon as I add any padding, the mergeDescendants
stops working. Is it a bug?
var checkedState by remember { mutableStateOf(false) }
Row(
Modifier
.clickable { checkedState = !checkedState }
.semantics(mergeDescendants = true) {}
.padding(top = 12.dp, bottom = 12.dp)
) {
Checkbox(
checked = checkedState,
onCheckedChange = { checkedState = !checkedState })
Text(text = "Some label", modifier = Modifier.padding(start = 8.dp))
Marko Novakovic
06/08/2021, 8:43 AMAnimatedVectorDrawable
to am icon but am getting
android.content.res.Resources$NotFoundException: Resource ID #0x0
.
I have drawable in resources and am passing correct id to the animatedVectorResource
.
any help?
if that’s relevant in my drawable resource file am using animated-selector
that animates between two `item`s with `transition`s defined in that selector.
Update:
animated-selector
animating two animated-vector
s. one vector from plus to minus other from minus to plus icon. BUT when I pass just minus to plus animated-vector
to animatedVectorResource
animation works and it knows how to reverse itRE
06/08/2021, 9:03 AMdimsuz
06/08/2021, 11:53 AMdimsuz
06/08/2021, 11:53 AMColumn {
Toolbar()
HeaderComposable()
Surface {
LazyColumn {
item { SheetHandle() }
items(bottomSheetItems) { ItemComposable() }
}
}
}
Dominaezzz
06/08/2021, 12:09 PMnitrog42
06/08/2021, 12:25 PMColton Idle
06/08/2021, 12:44 PMdimsuz
06/08/2021, 1:36 PMApple Inc
things are individual items. How would you do it? set elevation on each of those little items excluding a toolbar and the composable below?
2. BottomSheetScaffold won't work, because this is not an actual bottomwheet it's part of scrollable content, and everything above it slowly fades as it translates up. Designer vision 🙂Zun
06/08/2021, 1:36 PMdimsuz
06/08/2021, 1:36 PMnitrog42
06/08/2021, 1:42 PMdimsuz
06/08/2021, 1:44 PMZach Klippenstein (he/him) [MOD]
06/08/2021, 1:49 PMLazyRow
inside LazyColumn
items.
What’s bad is to nest lazy scrollables on the same axis, because only the outer one will actually be lazy. The reason is that the outer one measures its items without bounds on the scroll dimension, which means the inner one will always measure to its full height and never actually “use” laziness.dimsuz
06/08/2021, 2:09 PMAlbert Chang
06/08/2021, 2:19 PMModifier.nestedScroll()
I think.dimsuz
06/08/2021, 2:24 PMAlbert Chang
06/08/2021, 2:38 PMdimsuz
06/08/2021, 2:42 PMAlbert Chang
06/08/2021, 3:10 PMdimsuz
06/08/2021, 3:11 PMAlbert Chang
06/08/2021, 3:47 PMnitrog42
06/08/2021, 4:11 PMval iconPlaceable = measurables.first { it.layoutId == "icon" }.measure(constraints)
(found in JetSnack sample)dimsuz
06/08/2021, 4:34 PMWrote a quick sample.Great, thank you! I ended up with something like this, but my version doesn't do flings properly. Yours has the fling not working until the surface is fully expanded, but then it works. I tried to look how bottom sheet scaffold does it's flings and it uses SwipableState + modifier, and all this starts to overwhelm me 🙂 Need to rest.
btw I just looked how to do it when it's not a "first"/"last" item you wantNiice, didn't know about this trick!
Albert Chang
06/08/2021, 11:47 PMdimsuz
06/09/2021, 9:34 AM