Stephan Schuster
04/13/2022, 10:16 AMandroidx.compose.ui.text.font.FontFamily
from a font family defined in XML?James Black
04/13/2022, 6:28 PMRow(horizontalArrangement = Arrangement.Center) {
Switch(
checked = checkedState.value[index],
onCheckedChange = { ... }
)
Text(s.clothingLabel, style = MaterialTheme.typography.h6)
}
I am using compose 1.2.0-alpha07Trey
04/13/2022, 7:34 PMharry.singh
04/13/2022, 7:45 PMHorizontalPager
inside a scrollable Column
and the pages in the pager are of different height. Because of height differences, the shorter page have compensating whitespace at the bottom to match size of the tallest page(Right now I only have 2 pages). Is there a way to have the HorizontalPager
wrap it's height to the height of the currently selected page?Travis
04/13/2022, 8:10 PMval animatedSpacingScale by transition.animateFloat(label = "scale") { state ->
when(state) {
LargeSpacing -> 10f
NormalSpacing -> 1f
}
}
LazyRow(
horizontalArrangement = Arrangement.spacedBy(initialMargin * animatedSpacingScale),
) {
items(viewModel.urls) {
MyCustomImageWhatever(
url = it,
modifier = Modifier.height(90.dp)
.aspectRatio(1f, matchHeightConstraintsFirst = true),
)
}
}
and it works, but it causes recomposition of the list at every animation step.
Is there a nice clean way to get this done without all that recomposition or am I fundamentally misunderstanding something?Colton Idle
04/13/2022, 9:42 PMandroid.useAndroidX=true
needed in a pure compose android app?Lilly
04/14/2022, 12:07 AMColumn
? For example:
Column(modifier = Modifier.fillMaxWidth().height(80.dp).padding(12.dp)) {
Text("Text1")
Text("Text2")
// At bottom
Button(onClick = {}) {
Text("Click")
}
}
Valentin Gusselnikov
04/14/2022, 1:29 PMImage
if the Button
(which is placed at the end) is not visible and user have to scroll for it. Root Composable is ConstraintLayout
Slackbot
04/14/2022, 2:02 PMthe great warrior
04/14/2022, 3:45 PMdimsuz
04/14/2022, 4:00 PMColorFilter
?
Image(
painter = painterResource(R.drawable.multi_color_image),
colorFilter = buildColorMatrix(
replacements = mapOf(Color.White to Color.Red, Color.Black to Color.Blue)
)
)
fun buildColorMatrix(replacements: Map<Color, Color): ColorMatrix {
// ???
}
My color-space-fu is not strong enough. Or not possible?nuhkoca
04/14/2022, 5:10 PMprivate object MyRipple : RippleTheme {
@Composable
override fun defaultColor(): Color = TRTheme.colors.secondaryBlue1
@Composable
override fun rippleAlpha(): RippleAlpha = RippleTheme.defaultRippleAlpha(
Color.Black,
lightTheme = !isSystemInDarkTheme()
)
}
dazza5000
04/14/2022, 5:18 PMbrabo-hi
04/14/2022, 5:49 PMAndroid App Links
brabo-hi
04/14/2022, 6:30 PMThis version (1.2.0-alpha07) of the Compose Compiler requires Kotlin version 1.6.10 but you appear to be using Kotlin version 1.6.20
even though i have org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10
Colton Idle
04/14/2022, 10:49 PM<style name="Theme.My.App" parent="android:Theme.Material.NoActionBar" />
I think Chris Banes was talking about this sort of stuff last, but yeah. Just curious if theres a way to use non-appcompat theme (so no appcompat dependency) but have a DayNight theme?
because I don't want to bring in appcompat, but it looks like Theme.Material.* doesn't have any daynight variation. I thinkGumiku
04/15/2022, 4:27 AMideavim
with android studio
here?
do you know how can I disable the auto build?
don't know why it always trigger a auto build..😂ildar.i [Android]
04/15/2022, 11:06 AMManideep Polireddi
04/15/2022, 2:07 PMallan.conda
04/15/2022, 5:05 PMA -> B -> C
J -> K -> L
X -> Y -> Z
If app is in J, then it wants to go navigate to Y, how do I navigate to Y correctly?
I just call navController.navigate("Y")
, but then the bottom bar now behaves weirdly, tapping the J bottom bar does nothing.
The bottom bar is showing because it’s logic for visibility is currentDestination.hierarchy.any { it.route in bottomDestinations }
based
on official docs and samples.
Is there a better way?the great warrior
04/15/2022, 5:18 PMcolintheshots
04/15/2022, 9:20 PMLilly
04/15/2022, 10:03 PMTrey
04/16/2022, 3:13 PMallan.conda
04/16/2022, 3:34 PMLeander Behr
04/16/2022, 5:03 PMVinay Gaba
04/16/2022, 5:04 PManiruddha dhamal
04/16/2022, 5:10 PMLazyColumn
. Existing image shows until new image is available. It's using Coil's ImageLoader
and produceState
. Details in the 🧵Slackbot
04/16/2022, 8:15 PMmartmists
04/16/2022, 10:17 PMmartmists
04/16/2022, 10:17 PMsmallshen
04/17/2022, 12:08 AMmartmists
04/17/2022, 1:49 PM