alorma
10/27/2020, 7:07 AMAmbientEmphasisLevels
Grigorii Yurkov
10/27/2020, 7:22 AMviewModel()
function?Mayank Saini
10/27/2020, 8:36 AMMarquee
. Is this correct?
@Composable
fun MarqueeText(announcement: String, marqueeSpeed: MarqueeSpeed, modifier: Modifier = Modifier) {
val scrollState = rememberScrollState()
val scope = remember { CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate) }
onDispose { scope.cancel() }
ScrollableRow(scrollState = scrollState, modifier = modifier, children = {
Row {
repeat(1000) {
Text(
text = announcement, maxLines = 1
)
}
}
val scrollBy = when (marqueeSpeed) {
MarqueeSpeed.SLOW -> 2f
MarqueeSpeed.MEDIUM -> 6f
MarqueeSpeed.FAST -> 9f
}
scrollState.smoothScrollBy(scrollBy)
scope.launch {
while (true) {
scrollState.smoothScrollBy(scrollBy)
delay(50)
}
}
})
}
Kshitij Patil
10/27/2020, 8:46 AMAndroidView(resId)
has been removed in the snapshot build. Should I use LayoutInflator
inside viewblock?Adriano Celentano
10/27/2020, 8:51 AMMarko Gajić
10/27/2020, 11:48 AMGrigoriev Dmitriy
10/27/2020, 12:16 PMMaik
10/27/2020, 1:23 PMdrawOpacity
enables clipping in addition to the alpha value. From my point of view this seems to be a mistake, because it is not 100% clear from the modifier name or its description.
/**
* Draw content with modified opacity (alpha) that may be less than 1.
*
* Example usage:
* @sample androidx.compose.ui.samples.OpacitySample
*
* @param opacity the fraction of children's alpha value.
*/
@Stable
fun Modifier.drawOpacity(
@FloatRange(from = 0.0, to = 1.0) opacity: Float
) = drawLayer(alpha = opacity, clip = true)
alorma
10/27/2020, 3:04 PMAppBarIcon
been removed?spierce7
10/27/2020, 3:35 PMalorma
10/27/2020, 3:36 PMBruce Xia
10/27/2020, 3:59 PMalorma
10/27/2020, 5:11 PMkarandeep singh
10/27/2020, 5:58 PMiamthevoid
10/27/2020, 7:11 PMzoha131
10/27/2020, 7:25 PMGrigorii Yurkov
10/27/2020, 7:47 PMText(
text = money,
modifier = Modifier
.weight(.3f)
.wrapContentWidth(Alignment.End)
.wrapContentHeight(Alignment.CenterVertically),
fontSize = 12.sp
)
Guy Bieber
10/27/2020, 7:50 PMlouiscad
10/27/2020, 10:16 PMText
is no longer selectable by default. How can we make it selectable again?Javier
10/27/2020, 10:45 PMTim Malseed
10/28/2020, 1:08 AMCash Hsiao
10/28/2020, 3:57 AMConstraintLayout
will have a probability to be rendered or not.
I also discovered this issue in Owl project.Kshitij Patil
10/28/2020, 5:21 AMChethan
10/28/2020, 5:36 AMIrving
10/28/2020, 6:27 AM@sample
tag: just like: @sample androidx.compose.animation.core.samples.KeyframesBuilderForPosition
.I did't find it in the github. Could anyone give me a link?Tanks a lot!Grigorii Yurkov
10/28/2020, 9:40 AMButtonText(text = "Text", onClick = {}, modifier = Modifier.padding(top = 16.dp))
into this
ButtonText(
text = "Text",
onClick = {},
modifier = Modifier.padding(top = 16.dp)
)
I am so tired to do this manually.Mayank Saini
10/28/2020, 10:43 AMhorizontal progress
in compose. Should I use slider
?Kshitij Patil
10/28/2020, 11:04 AMnavigation-compose
alpha released? Where can I track the new releases?allan.conda
10/28/2020, 11:18 AMallan.conda
10/28/2020, 11:38 AMallan.conda
10/28/2020, 11:38 AMDoris Liu
10/29/2020, 12:54 AMslideInVertically
shouldn't clip, but its parent may choose to clip it. Which composable are you seeing the clipping in?allan.conda
10/29/2020, 12:54 AMDoris Liu
10/29/2020, 12:58 AMallan.conda
10/29/2020, 1:21 AMDoris Liu
10/29/2020, 1:25 AMinitiallyVisible
param to true, to prevent animations from firing.allan.conda
10/29/2020, 1:59 PMDoris Liu
10/29/2020, 7:50 PMval items = remember { colors.map {
Pair(it, mutableStateOf(false) /*initiallyVisible*/) } }
LazyColumnFor(
items
) {
AnimatedVisibility(true, initiallyVisible = it.second.value) {
onDispose {
it.second.value = true
}
// Children here
}
}
allan.conda
10/30/2020, 9:38 AM