Gerardo Ernesto Rodriguez Navar
02/08/2022, 1:19 PM@OptIn
annotations in a production app?dimsuz
02/08/2022, 1:54 PMLocalConfiguration.current
present in the Compose's resources()
. Does it have the effect of recomposing when Configuration
changes?
@Composable
@ReadOnlyComposable
private fun resources(): Resources {
LocalConfiguration.current
return LocalContext.current.resources
}
Mehdi Haghgoo
02/08/2022, 3:41 PMmattinger
02/08/2022, 5:43 PMelectrolobzik
02/08/2022, 5:52 PM<https://play.kotlinlang.org/hands-on/Full%20Stack%20Web%20App%20with%20Kotlin%20Multiplatform>
I get this error: The Compose Compiler requires the Compose Runtime to be on the class path, but none could be found
while compiling jvm target. I have compose dependencies specified only for js target, but it looks like the Compose Plugin is used for jvm and it causes the error. How could I fix that? Are there any sample projects with Compose and Ktor backend working together?Joseph Hawkes-Cates
02/08/2022, 5:58 PMLocalConfiguraiton.current
. If I remove the “orientation” entry from the “android:config” changes field in my manifest, then it works every time, but with that in there, it will not update the first couple times, then it’ll work after that. Code in 🧵Zhelyazko Atanasov
02/08/2022, 6:11 PMLazyColumn
. We have many tests where we show a list of items, scroll to a particular index and perform actions on the item at that index - e.g. click it. But I can't find a way to do that using only an item index. There's a method performScrollToIndex(index) that does the scrolling, but after that it's not possible to get the semantics node at that index. If you do something like:
val index = 1000
onNodeWithTag(COUNTRY_LIST).performScrollToIndex(index)
onNodeWithTag(COUNTRY_LIST).onChildAt(index).performClick()
it doesn't work, because the LazyColumn (it has a Modifier.testTag(COUNTRY_LIST)
) only has "_<number_of_visible_items> + 2"_ number of children (nodes) at a given time.
Ideally I'd like to do something like onNodeWithTag(COUNTRY_LIST).performScrollToIndex(index).performClick()
, but performScrollToIndex
returns the semantics node on which the method was called 😞 If you have a test tag, text or anything else that can be used to match the item at index
, then you can perform actions/assertions on it, but do you know of a way to do that having only an index/position?Luke
02/08/2022, 6:38 PMandroid:hyphenationFrequency
set on them, and we want to migrate to Compose, but we can't find an equivalent as of version 1.0.5Nacho Ruiz Martin
02/08/2022, 6:54 PMforEach
?
Simplified version of the parent Composable looks like this:
val items: MutableList<...> = ...
Column() {
items.forEach { item ->
ChildComposable()
}
}
AnimatedVisibility
applied in parent doesn’t work because the parent is always there. Applying it to the children works on enter but not en “exit” because when the item disappears from the list there’s no longer a child Composable to “exit”.
Thanks! 🙇Chris Fillmore
02/08/2022, 7:40 PMRajashekar
02/08/2022, 8:06 PMbrabo-hi
02/08/2022, 8:40 PMRobert Menke
02/09/2022, 4:35 AMZoltan Demant
02/09/2022, 4:59 AMrememberDraggableState
and vibrating after a certain drag distance, I often see the vibration not staying in sync with the drag events. Is this a bug? Code in thread 🧵james
02/09/2022, 6:31 AMAnimatedVisibility
where, when wrapping a composable with it, the children of that composable are now backwards?
what I mean is, I have this var isExpanded
and if I simply have two children inside that, ComposableA and ComposableB, it works as expected.. but now I want to animate, and so I replace my check for if isExpanded
with an AnimatedVisibility
composable, and now when my children are drawn on screen, they are drawn like ComposableB then ComposableA
is this a bug or am I missing something in how to use it?galex
02/09/2022, 7:07 AMdarkmoon_uk
02/09/2022, 10:28 AMChris Fillmore
02/09/2022, 12:14 PMpopBackStack()
? (or if the user clicks the back button, or clicks on something that calls navigate()
)
Currently the animation only plays if the user clicks on the scrim or drags the sheet down.elye
02/09/2022, 12:51 PMmattinger
02/09/2022, 1:54 PMLuis Daivid
02/09/2022, 2:19 PMSepideh Vatankhah
02/09/2022, 2:40 PMYev Kanivets
02/09/2022, 3:44 PMSystem.currentTimeMillis()
in if inside composable directly (I think it won't cause recomposition)? Or should I pass it as part of the state and change with old good timer? Or are there better approaches?K Merle
02/09/2022, 4:57 PMVahalaru
02/09/2022, 5:40 PMGerardo Ernesto Rodriguez Navar
02/09/2022, 6:16 PMShakil Karim
02/09/2022, 7:16 PMTolriq
02/09/2022, 7:28 PMColton Idle
02/09/2022, 7:38 PMColton Idle
02/09/2022, 8:05 PMADJUST_RESIZE
. (I8eaeb, b/190539358, b/192043120)
• Bunch of more commits regarding input field focus although I think the main bug on issuetracker is not technically fixed yet
• Window inset modifiers?! Not sure exactly what this means yet, but I do wonder if this makes accompanist-insets unnecessary?
• Debounce restart input commands in TextInputServiceAndroid (I believe this fixes the "flash" on the keyboard when moving from one input field to another)
• "Support content types in Lazy lists" ("Providing such information helps item composition reusing logic to make it more efficiently and only reuse the content between the items of similar type.")
• Oh. Yep to the above ^ "The soft keyboard input type no longer flickers when changing focus between text fields. (I1bf50, b/187746439)"
• Lots of things related to text field magnification? (I gotta admit, I'm not sure exactly what this is but theres a bunch of commits about it) /shruggie
• New scrollable chip group sample added
• New material 3 components (DropdownMenu, DropdownMenuItem, Card, OutlinedCard, ElevatedCard)
• Added movableContentOf
which converts a composable lambda into a lambda that moves it state, and corresponding nodes, to any new location it is called. When the previous call leaves the composition the state is temporarily preserved and if a new call to the lambda enters the composition then the state, and associated nodes, are moved to the location of the new call. If no new call is added the state is removed permanently and remember observers are notified.
• Added a tracing API to composition to enable tools to provide more detailed tracing of composable functions. The compiler now generates calls to the tracing API which include source information. (Ib0eb5) This apparently adds required/optional (not sure) proguard rules? -assumenosideeffects public class <http://androidx.compose.runtime.Com|androidx.compose.runtime.Com>...
• Add InternalComposeScope
which gives tools the ability to identify a composable during recompositions. (I07a3f)
• Fix bug when rememberSaveable with input is restored in the wrong order
• A bunch of changes regarding Fonts
• A bunch of things regarding MPP and Robolectric
• Also, I didn't see this in release notes, but it seems like it was fixed according to issue tracker "Add material decoration box for TextField and OutlinedTextField/ Provide a way to remove the extra horizontal padding from TextField It allows additionally to what is customisable in text fields already to customise paddings (incl. for dense text field support), border or indicator line."Colton Idle
02/09/2022, 8:05 PMADJUST_RESIZE
. (I8eaeb, b/190539358, b/192043120)
• Bunch of more commits regarding input field focus although I think the main bug on issuetracker is not technically fixed yet
• Window inset modifiers?! Not sure exactly what this means yet, but I do wonder if this makes accompanist-insets unnecessary?
• Debounce restart input commands in TextInputServiceAndroid (I believe this fixes the "flash" on the keyboard when moving from one input field to another)
• "Support content types in Lazy lists" ("Providing such information helps item composition reusing logic to make it more efficiently and only reuse the content between the items of similar type.")
• Oh. Yep to the above ^ "The soft keyboard input type no longer flickers when changing focus between text fields. (I1bf50, b/187746439)"
• Lots of things related to text field magnification? (I gotta admit, I'm not sure exactly what this is but theres a bunch of commits about it) /shruggie
• New scrollable chip group sample added
• New material 3 components (DropdownMenu, DropdownMenuItem, Card, OutlinedCard, ElevatedCard)
• Added movableContentOf
which converts a composable lambda into a lambda that moves it state, and corresponding nodes, to any new location it is called. When the previous call leaves the composition the state is temporarily preserved and if a new call to the lambda enters the composition then the state, and associated nodes, are moved to the location of the new call. If no new call is added the state is removed permanently and remember observers are notified.
• Added a tracing API to composition to enable tools to provide more detailed tracing of composable functions. The compiler now generates calls to the tracing API which include source information. (Ib0eb5) This apparently adds required/optional (not sure) proguard rules? -assumenosideeffects public class <http://androidx.compose.runtime.Com|androidx.compose.runtime.Com>...
• Add InternalComposeScope
which gives tools the ability to identify a composable during recompositions. (I07a3f)
• Fix bug when rememberSaveable with input is restored in the wrong order
• A bunch of changes regarding Fonts
• A bunch of things regarding MPP and Robolectric
• Also, I didn't see this in release notes, but it seems like it was fixed according to issue tracker "Add material decoration box for TextField and OutlinedTextField/ Provide a way to remove the extra horizontal padding from TextField It allows additionally to what is customisable in text fields already to customise paddings (incl. for dense text field support), border or indicator line."Zach Klippenstein (he/him) [MOD]
02/10/2022, 12:07 AMADJUST_PAN
, my bad. Working on fixing the release notes now. Sorry.Colton Idle
02/10/2022, 12:22 AMBen Trengrove [G]
02/10/2022, 5:27 AMZach Klippenstein (he/him) [MOD]
02/10/2022, 5:31 AMjasu
02/10/2022, 7:38 AMZach Klippenstein (he/him) [MOD]
02/11/2022, 8:54 AMjasu
02/11/2022, 1:17 PMZach Klippenstein (he/him) [MOD]
02/11/2022, 9:33 PMSiyamed
02/14/2022, 5:14 AM