Zach Klippenstein (he/him) [MOD]
04/15/2020, 8:28 PMsubscribeAsState
to behave like `Flow`’s collect
. If you wrapped the exception outside the remember
block before rethrowing, the stack traces would probably be really helpful for debugging as well.
Errors still “should” be handled by onErrorReturn
and friends, but at least that would reduce the likelihood that actual exceptions get dropped on the floor by accident.codeslubber
04/15/2020, 9:57 PMSiyamed
04/15/2020, 11:30 PMmolikto
04/16/2020, 3:55 AMcomposeOptions.kotlinCompilerVersion
needs the new compiler dependency. Does anyone know how to get the correct compiler dependencies? If there are no straightforward way then it is fine, I will just wait for dev10 published.Vinay Gaba
04/16/2020, 5:26 AMZach Klippenstein (he/him) [MOD]
04/16/2020, 10:05 PMSiyamed
04/17/2020, 3:25 AMflosch
04/18/2020, 10:05 AMColorPalette
appwide like that:
object AppColors {
private val primaryColor: Color = Color(0x464763)
val lightPalette: ColorPalette = lightColorPalette(
primary = primaryColor
)
val darkPalette: ColorPalette = darkColorPalette(
primary = primaryColor
)
@Composable
val currentPalette: ColorPalette
get() = if (isSystemInDarkTheme()) darkPalette else lightPalette
}
When I use it for my MaterialTheme(colors = AppColors.currentPalette) { … }
, the primary color is just invisible or set to transparent, what am I doing wrong?
If I dont overwrite the primary, then everything works as expected (images in thread).Timo Drick
04/18/2020, 1:35 PMMBegemot
04/18/2020, 3:10 PMjitinsharma
04/18/2020, 4:11 PMSrSouza
04/19/2020, 5:31 PMlouis993546
04/20/2020, 8:21 AMmolikto
04/21/2020, 3:14 AMText
pick up a Emphasis.high, so the actual content color for Text is not pure black.bhatnagarm
04/21/2020, 9:09 AMFunctions which invoke @Composable functions must be marked with the @Composable annotation
which is fine. I'm wondering what's the alternative to this.Laura Oran
04/21/2020, 4:28 PMsemoro
04/21/2020, 7:15 PMContentScale.FillWidth
? When image width is bigger then clip area
Image(
asset = image,
modifier = Modifier.clip(RoundedCornerShape(20.dp)),
contentScale = ContentScale.FillWidth
)
Fudge
04/21/2020, 7:50 PMGabriel Feo
04/21/2020, 8:25 PMText
or filter all touch events?Mark Murphy
04/21/2020, 9:16 PMVinay Gaba
04/22/2020, 5:29 AMromainguy
04/22/2020, 4:49 PMflosch
04/22/2020, 5:33 PMsunnat629
04/22/2020, 5:48 PMandroidx.ui:ui-framework:$compose_version
? Thanks in advance...Gabriel Feo
04/23/2020, 12:36 AMPointerInput
doesn't seem to be a fit, as PointerInputHandler
can't be @Composable
molikto
04/23/2020, 4:47 AMsavedInstanceState
inside a "view pager" page, and when I go to another page then come back I got an Key -751342538 was already registered. Please call unregister before registering again
at androidx.ui.savedinstancestate.UiSavedStateRegistryImpl.registerProvider
Luoqiaoyou
04/23/2020, 8:18 AMmolikto
04/23/2020, 1:40 PMList<String>
as stable?ShreemanArjun
04/23/2020, 7:39 PMColton Idle
04/24/2020, 1:11 AMColton Idle
04/24/2020, 1:11 AMLeland Richardson [G]
04/24/2020, 5:55 AMColton Idle
04/24/2020, 6:52 AMBrian Gardner
04/24/2020, 2:18 PMLeland Richardson [G]
04/27/2020, 9:01 PMmutableStateOf(...)
where you used it instead of state { ... }
. The latter seems more correct based on the usage.Ryan Mentley
04/27/2020, 9:02 PMBrian Gardner
04/27/2020, 9:03 PMLeland Richardson [G]
04/27/2020, 9:04 PMstate
though.Brian Gardner
04/27/2020, 9:04 PMmutableStateOf()
work differently than state
?Leland Richardson [G]
04/27/2020, 9:06 PMmutableStateOf
is like a constructor, and will create a new instance each time (with the value you pass in). The state
function is a composable function which will only execute the init
lambda the first time, and it will remember the instance each time. when creating state ina composable function, this is usually what you want. it is basically shorthand for remember { mutableStateOf(init()) }
Ryan Mentley
04/27/2020, 9:07 PMmutableStateOf
in the preview, I think, is the one that probably should lost be state
Brian Gardner
04/27/2020, 9:08 PMremember{}
block inside the composable function?Ryan Mentley
04/27/2020, 9:09 PMMutableState
directly like this? https://github.com/BrianGardnerAtl/JetpackComposePlayground/blob/adapter-list-state-spike/app/src/main/java/tech/briangardner/composeplayground/MainActivity.kt#L58Leland Richardson [G]
04/27/2020, 9:09 PMRyan Mentley
04/27/2020, 9:09 PMLeland Richardson [G]
04/27/2020, 9:10 PMBrian Gardner
04/27/2020, 9:10 PMRyan Mentley
04/27/2020, 9:11 PMLeland Richardson [G]
04/27/2020, 9:11 PMBrian Gardner
04/27/2020, 9:13 PMLeland Richardson [G]
04/27/2020, 9:17 PMBrian Gardner
04/27/2020, 9:20 PMLeland Richardson [G]
04/27/2020, 9:22 PMBrian Gardner
04/27/2020, 9:23 PMLeland Richardson [G]
04/27/2020, 9:23 PMonCommit
to do it properlyBrian Gardner
04/27/2020, 9:24 PMLeland Richardson [G]
04/27/2020, 9:25 PMBrian Gardner
04/27/2020, 9:25 PMonCommit
or onActive
too much so I’ll look into those nextLeland Richardson [G]
04/27/2020, 9:26 PMstate
and see if that fixes the adapterlist bug you filed?Brian Gardner
04/27/2020, 9:27 PMstate
worksLeland Richardson [G]
04/27/2020, 9:28 PM