trevjones
10/24/2022, 11:13 PMBrian Guertin
10/25/2022, 12:47 AMfindModifierLocalProvider
a million times? I think it started happening when I last updated compose. I can't figure out what's causing it.Naga
10/25/2022, 4:55 AMArjan van Wieringen
10/25/2022, 8:26 AMallan.conda
10/25/2022, 9:21 AMJake
10/25/2022, 9:49 AMHorizontalPager
.
By testing the sample code from the guide works great:
// Display 10 items
HorizontalPager(count = 10) { page ->
// Our page content
Text(
text = "Page: $page",
modifier = Modifier.fillMaxWidth()
)
}
But I need to display different `Composable`s in different pages instead of same element. The only way I figured how to do this is the following:
HorizontalPager(count = 3) {
if(currentPage == 0){
FirstView() // Composable
} else if (currentPage == 1) {
SecondView() // Composable
} else if (currentPage == 2){
ThirdView() // Composable
}
The problem with this implementation is that when I swipe to navigate, it appears like the view coming from the side is the same as the current view. When the currentpage
updates to the next view it suddenly updates the view to the upcoming view. So there is no smooth animation like in the sample code. Suggestions how to implement this better?Geert
10/25/2022, 12:49 PMCould not enable resolution traces
Unable to set the global setting:
"debug_view_attributes_application_package"
to: "app.medxpert.medxpert"
Error: Exception occurred while executing 'put':
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
I added <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
but that permission is only for system apps. Can someone help me find out why my composable are not shown. I see the layout, but the component tree isnt showingGeert
10/25/2022, 12:53 PMAbdul Hafeez Sajid
10/25/2022, 1:29 PMColton Idle
10/25/2022, 1:32 PMcheck it out▾
playlist▾
SnapshotStateList
and SnapshotStateMap
now have explicit implementaions of toList()
and toMap()
, respectfully.
• A new method, awaitEachGesture()
, for gesture detectors was added.
• Added DrawStyle
as an Experimental attribute to TextStyle
and SpanStyle
to enable drawing outlined text. (If24b8, b/155421273) WOOOOO
• Thanks for vighnesh
for adding TV Devices to Previews (Ie15cd)
Other:
• Android TV for compose?! idk when this was announced, but I saw it in the Keynote. Compose can now be used for Android TV development. edit: more here
• "Relay" was announced for figma <> Composable generation. (definitely cool, but idk if i would trust it. What I would really love is to click a button in figma to generate composable code, and then I can tweak that code, instead of copy pasting and guessing about figma gradient code and bringing into a composable for example)PHondogo
10/25/2022, 3:12 PMSteffen Funke
10/25/2022, 5:40 PMunstable
/ not skippable
item views in LazyList
=> 🧵Tolriq
10/25/2022, 7:47 PMJasmin Fajkic
10/25/2022, 7:53 PMSiyamed
10/25/2022, 9:02 PMhttps://www.youtube.com/watch?v=_qls2CEAbxI▾
Lucas
10/25/2022, 10:26 PMColton Idle
10/25/2022, 11:42 PMDialog(
onDismissRequest = onClose,
properties = DialogProperties(
usePlatformDefaultWidth = false,
decorFitsSystemWindows = false,
dismissOnClickOutside = false,
dismissOnBackPress = false,
),
) {
Dmitry Akishin
10/26/2022, 5:30 AMremember
them? Or is there some optimization already built in?
Here is some specific code:
@Composable
private fun SomeComposable() {
val fun1: (int: Int) -> String = { int ->
int.toString()
}
fun fun2(int: Int): String {
return int.toString()
}
val fun3: (int: Int) -> String = remember {
{ int ->
int.toString()
}
}
fun1(5)
fun2(5)
fun3(5)
}
What would be the most optimal approach between fun1
, fun2
and fun3
?Paul Woitaschek
10/26/2022, 8:05 AMtransparent
or transparent2
?
@Composable
public fun TransparentTopAppBar(
contentListState: LazyListState,
) {
val transparent by remember {
derivedStateOf {
contentListState.firstVisibleItemIndex == 0 && contentListState.firstVisibleItemScrollOffset == 0
}
}
val transparent2 by remember(contentListState) {
derivedStateOf {
contentListState.firstVisibleItemIndex == 0 && contentListState.firstVisibleItemScrollOffset == 0
}
}
}
ste
10/26/2022, 9:43 AMsupportsRtl=false
, but a RTL language is set, LocalLayoutDirection
isn't immediately set to Ltr, causing the UI to be composed in rtl for a brief moment:
println("layout direction: ${LocalLayoutDirection.current}")
// layout direction: Rtl
// layout direction: Ltr
Of course I can make LocalLayoutDirection
always provide LayoutDirection.Ltr
, but is this expected?Alex
10/26/2022, 9:46 AMFailed resolution of: Lkotlin/time/AbstractLongTimeSource
Dmitry Akishin
10/26/2022, 10:55 AMNicolas Chaduc
10/26/2022, 12:21 PMval modifier = Modifier.fillMaxSize()
Button(....,
modifier= modifier) {
Column(modifier = modifier) {
Text(...., modifier = modifier)
}
}
The text was not just with fillMaxSize it has the padding the button add on modifier too.Jasmin Fajkic
10/26/2022, 1:25 PMPedro Alberto
10/26/2022, 1:52 PMTolriq
10/26/2022, 3:13 PMText(text = "$title\n ")
that is dumped as <node index="0" text="All albums " resource-id="" ...
but I can't find / select it (By.text
with the dumped value, `By.textContains`or textStartsWith
) if I remove the "\n " from the source code then all works as usual.kenkyee
10/26/2022, 4:01 PMcommanderpepper
10/26/2022, 6:03 PMBilly Newman
10/26/2022, 6:37 PMKotlinLeaner
10/26/2022, 7:31 PMKotlinLeaner
10/26/2022, 7:31 PMChrimaeon
10/26/2022, 7:56 PM