rsktash
02/12/2021, 3:01 AMaiidziis
02/12/2021, 6:13 AMalpha12
. It would be nice if more people could start this issue: https://issuetracker.google.com/issues/177561480allan.conda
02/12/2021, 11:41 AMAndré Thiele
02/12/2021, 2:19 PMjulioromano
02/12/2021, 2:24 PMAndroidView
undergo state restoration as usual? (i.e. is their state actually written to the save state bundle during config changes and is it restored afterwards?)
Asking because a WebView
inside an AndroidView
will have its content reloaded at any configuration change, no matter if I call webView.loadUrl("...")
inside `AndroidView`’s viewBlock
or update
params.
Same goes for a RecyclerView
inside an `AndroidView`: Scroll position is not restored on configuration changes.
I also tried putting a custom view inside an AndroidView
and I could verify its onSaveInstanceState()
method is called during config changes but its onRestoreInstanceState()
is not.steelahhh
02/12/2021, 3:43 PMShakil Karim
02/13/2021, 5:57 AMlewis
02/13/2021, 10:26 AMViewModel
that has constructor dependencies (i.e. database subscriptions) without something like Hilt? Custom androidx.lifecycle.ViewModelProvider.Factory
I assume but the docs are a little thin on this subject.Orhan Tozan
02/13/2021, 10:28 AMlouiscad
02/13/2021, 5:18 PMandroidx
.
Please sign if you agree!
https://www.change.org/p/google-drop-androidx-from-jetpack-compose-package-name-for-multiplatform-before-1-0-releaseMehdi Haghgoo
02/14/2021, 3:14 PMnglauber
02/15/2021, 2:04 PMaccompanist_coil_version = '0.5.0'
accompanist_picasso_version = '0.5.0'
app_compat_version = '1.3.0-beta01'
compose_version = '1.0.0-alpha12'
compose_navigation_version = '1.0.0-alpha07'
core_ktx_version = '1.3.2'
gson_version = '2.8.6'
kotlin_version = "1.4.21-2"
lifecycle_version = '2.3.0'
material_version = '1.3.0'
okhttp_version = '4.9.0'
room_version = "2.2.6"
manueldidonna
02/16/2021, 11:09 AMAhmet Delibaş
02/16/2021, 12:17 PMLukas K-G
02/16/2021, 2:45 PMAndroidView()
, but now I need to place other components above this view that should not exceed the AndroidView
s bounding boxes.
Which means I somehow need a layout component that has exactly the size and position of that AndroidView
. Any help would be highly appreciated.zsperske
02/16/2021, 4:06 PMKyant
02/17/2021, 11:25 AMImageVector.Builder
to Outline
path (for Shape)?
Their draw functions are similar but I cannot copy and paste them directly, especially arcToRelative
.steelahhh
02/17/2021, 3:16 PMenabled = false
. Doesn't work when dismissing by back button press tho, so I've just disabled it for now 🤷🏼Kensuke Sano
02/18/2021, 8:13 AMval intent = Intent(Intent.ACTION_VIEW, Uri.parse("<http://example.com/xxx>"))
ContextCompat.startActivity(context, intent, null) // open WebView
// How to track wevViewURL?
if (webViewURL == "/finish") {
// How to close webview?
}
Lilly
02/18/2021, 7:02 PMsaveable
stuff. I have filed a bug: https://issuetracker.google.com/issues/180624912jim
02/18/2021, 11:03 PMnatario1
02/19/2021, 5:47 PMJavier
02/20/2021, 6:22 PMjim
02/20/2021, 7:37 PMKTX
, back before the Android Kotlin Extensions (also called KTX) started competing for the same name. If you look back at some of the original commits to Compose, you'll see a flag to enable/disable the KTX syntax. There were some very real reasons the syntax existed, which maybe we'll go into in a blog post or something some day. Those early explorations had a major impact both on what Compose is today and what Kotlin can do today.Arkadii Ivanov
02/20/2021, 8:20 PMTristan
02/20/2021, 10:47 PMRating(4.3F, 5)
Is there anything wrong with what I have done? Will I have performances issue? 😮 Thanks for your help.
@Composable
fun Rating(score: Float, maxScore: Int, modifier: Modifier = Modifier, tint: Color = Color.Yellow) {
val shape = remember(score) {
val rate = score - score.toInt()
GenericShape { size ->
lineTo(size.width * rate, 0f)
lineTo(size.width * rate, size.height)
lineTo(0f, size.height)
}
}
val icon = vectorResource(id = R.drawable.ic_star)
Row(modifier = modifier) {
for (i in 0 until maxScore) {
if (i + 1 < score) {
Icon(
imageVector = icon,
tint = tint,
)
} else if (i < score) {
Box {
Icon(
imageVector = icon,
)
Icon(
imageVector = icon,
tint = tint,
modifier = Modifier.clip(shape),
)
}
} else {
Icon(
imageVector = icon,
)
}
}
}
}
0rph3u
02/22/2021, 12:50 PMjim
02/23/2021, 6:35 PMVivek Sharma
02/23/2021, 6:39 PMpressIndicatorGesture
; is it something related to InteractionState
?Sam
02/23/2021, 8:12 PMLazyColumn
in our chat app, the LazyListState
api is very limited with smoothScrollBy
and snapToItemIndex
and there is not much you can do at this point until the api becomes more robust