Anthony
07/20/2021, 3:41 PMalorma
07/20/2021, 4:51 PMDropdownMenu
with some DropdownMenuItem
I want to show some items with icon and some without... but i got this: code in 🧵Alexa_Gal
07/20/2021, 5:40 PMShakil Karim
07/20/2021, 5:42 PM@Immutable
and what will be the difference with @Stable
Code in 🧵Peter Mandeljc
07/20/2021, 6:00 PMModalBottomSheetLayout
and I'm having a weird effect, please see video. Sheet layout seems to visually collapse on start. Any ideas? Source code in thread.orangy
07/20/2021, 6:26 PMDp
, DpOffset
and even DpRect
, but no DpSize
… For some reason, I need DpSize
much more often than offset or rect. Could you please add it for completeness?Marko Novakovic
07/20/2021, 7:41 PMsealed class
with @Immutable
has any effect on subclasses?Tash
07/20/2021, 9:14 PMSideEffect
etc, and putting logs in it, or something?orangy
07/20/2021, 9:49 PMallan.conda
07/21/2021, 3:27 AMshowSnackbar
state and clearing it in on result,
If user navigates to another screen before the snackbar result, the composable is not able to update its result because of cancellation.
Then the user goes back to the Composable with a new composition and shows the snackbar again.
Is there a better way of handling snackbarstates? Code in threadTlaster
07/21/2021, 7:59 AMTiago Nunes
07/21/2021, 10:47 AMval nameFieldLiveData = savedStateHandle.getLiveData(NAME_FIELD_KEY, "")
val nameFieldFlow: Flow<String> = maxPassengersLive.asFlow()
fun setNameField(name: String) {
nameFieldLiveData.value = name
}
It would be great if there was a savedStateHandle.getFlow which returned a MutableStateFlow, right?
Our main issue with LiveData is the fact that it holds a String! instead of a String. So in the case of my example, nameFieldFlow becomes a Flow<String!>, unless I specify the type explicitly. And I always forget to specify the type explicitlyAnudeep Ananth
07/21/2021, 10:57 AMmario
07/21/2021, 11:29 AMtitle: (@Composable () -> Unit)? = null,
text: @Composable (() -> Unit)? = null,
both are composable but the name indicate something specific (text).
I have tried to create a OutlinedTextField in text parameter with a strange result, it would not be better to create a content parameter?Shakil Karim
07/21/2021, 11:49 AMandroidx.compose.ui.tooling.preview.PreviewActivity is not an Activity subclass or alias
is it a known issue ?
using compose 1.0.0-rc02George Kylafas
07/21/2021, 2:03 PMandroidx.compose.ui:ui-util:1.0.0-rc02
includes a fastMap()
but not a fastMapIndexed()
function? Would it be the same as if using kotlin std lib's mapIndexed()
?brandonmcansh
07/21/2021, 3:15 PMBottomAppBarCutoutOffset
of the BottomAppBar?Rick Regan
07/21/2021, 3:43 PMText
that is made both .draggable
and able to detect onTap
(with .pointerInput
detectTapGestures
) if a flag is true (and neither of those if the flag is false).
The .draggable
Modifier has an enabled
parameter which I use for this purpose, but .pointerInput
does not, so I add and remove it from the Modifier chain as appropriate.
I tried adding .draggable
in the same manner, for consistency, instead of using enabled
, and it seems to work just as well. I was wondering though if there was any reason
to prefer enabled
over changing the Modifer.dimsuz
07/21/2021, 4:39 PMSe7eN
07/21/2021, 5:56 PMjava.lang.AbstractMethodError: abstract method "void androidx.lifecycle.DefaultLifecycleObserver.onCreate(androidx.lifecycle.LifecycleOwner)"
I'm using compose 1.0.0-rc02 and activity 1.3.0-rc02. Does anyone know what's wrong? 🧵Daniel Burnhan
07/21/2021, 8:03 PMLukasz Burcon
07/21/2021, 8:15 PM@Immutable
and @Stable
should really be used to make the most out of them. I couldn’t really find any use cases for them, as even marking a class with @Immutable
annotation doesn’t mean it will always be skipped from recomposition after being altered (code in the thread). Does anyone have any code examples showing benefits of using either one?mattinger
07/21/2021, 9:10 PMe: This version (1.0.0-rc01) of the Compose Compiler requires Kotlin version 1.5.10 but you appear to be using Kotlin version 1.5.20 which is not known to be compatible. Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).
what’s even odder is that i’m using rc02 of compose and it’s compiler.hfhbd
07/21/2021, 11:42 PMuiTooling
dependency requires androidx.activity:activity-compose:1.4.0-alpha01
, which is not (yet) published to https://maven.google.com/web/index.html#androidx.activity:activity-composeShawn Tucker
07/22/2021, 12:00 AMtad
07/22/2021, 12:13 AMRenderEffect
in Compose! https://gist.github.com/tadfisher/dc908504a7189be82c8df2151ede590bJason Inbody
07/22/2021, 1:31 AMSudhir Singh Khanger
07/22/2021, 4:26 AMremeber
function only initialized during Initial Composition
or is it always initialized during recomposition
but with the last saved value?
2. Is val state: Int = remember { 1 }
as good as val state: Int = 1
because in both cases state
variable is immutable and once it is initialized it can only be read?
3. In val state: MutableState<Int> = remember { mutableStateOf(1) }
, can you do something like state.value = 2
to change value of state and which would trigger recomposition.rajesh
07/22/2021, 6:37 AMlike
property of an object) when user click on like button.Vitaliy Zarubin
07/22/2021, 8:51 AMVitaliy Zarubin
07/22/2021, 8:51 AMRick Regan
07/22/2021, 1:56 PMMark Allison
07/22/2021, 2:43 PM