Cyril Find
11/13/2020, 11:18 AMKshitij Patil
11/13/2020, 11:27 AMDivider
as vertical line?Animesh Sahu
11/13/2020, 11:33 AMhttps://www.youtube.com/watch?v=SMOhl9RK0BA?t=10m41s▾
content: @Composable () -> Unit
lambda? How would somebody handle the click events inside the lambda?salomonbrys
11/13/2020, 12:42 PMPavel Marchenko
11/13/2020, 1:45 PMzoha131
11/13/2020, 3:47 PMviewModel
scoped to a composable
using navigation-compose
?Kirill Grouchnikov
11/13/2020, 5:20 PMShaderBrush
+ LinearGradientShader
. Is that intentional?zoha131
11/13/2020, 7:25 PMfkrauthan
11/13/2020, 8:35 PMSam
11/13/2020, 8:56 PM@Composable
fun Confetti() {
val context = ContextAmbient.current
val konfettiView = remember {
KonfettiView(context).apply {
build()
.addColors(Color.YELLOW, Color.GREEN, Color.MAGENTA)
.setDirection(0.0, 359.0)
.setSpeed(1f, 5f)
.setFadeOutEnabled(true)
.setTimeToLive(2000L)
.addShapes(Square, Circle)
.addSizes(Size(12))
.setPosition(-50f, 500 + 50f, -50f, -50f)
.streamFor(300, 5000L)
}
}
AndroidView({ konfettiView }, modifier = Modifier.fillMaxSize()) { view ->
// Do something here?
}
}
really hard to understand what's going wrong here! any advice?David Attias
11/13/2020, 9:42 PMYann Badoual
11/13/2020, 9:52 PMAndroidEntrypoint
annotated activity, I'm now getting has no zero argument constructor
when using the viewModel()
composable to retrieve an instance
(the ViewModel's constructor does have the ViewModelInject
annotation)redrield
11/14/2020, 1:54 AMredrield
11/14/2020, 3:07 AME/AndroidRuntime: FATAL EXCEPTION: main
Process: com.redrield.androidds, PID: 15301
java.lang.NoSuchFieldError: No field Companion of type Landroidx/compose/runtime/SlotTable$Companion; in class Landroidx/compose/runtime/SlotTable; or its superclasses (declaration of 'androidx.compose.runtime.SlotTable' appears in /data/app/~~58hYPPzhGRjb56GwSeeO0g==/com.redrield.androidds-WjdLhG2Oom4gM1SnqQGjqg==/base.apk)
at androidx.compose.material.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:112)
Any idea why this would be happening? It started after I added compose-navigation, even if I've cut out all reference to it where the theme composable is being called, in fact there's no content there at allredrield
11/14/2020, 3:08 AMimplementation 'androidx.compose.ui:ui:1.0.0-alpha07'
// Tooling support (Previews, etc.)
implementation 'androidx.ui:ui-tooling:1.0.0-alpha06'
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
implementation 'androidx.compose.foundation:foundation:1.0.0-alpha06'
// Material Design
implementation 'androidx.compose.material:material:1.0.0-alpha06'
// Material design icons
implementation 'androidx.compose.material:material-icons-core:1.0.0-alpha06'
implementation 'androidx.compose.material:material-icons-extended:1.0.0-alpha06'
// Integration with observables
implementation 'androidx.compose.runtime:runtime-livedata:1.0.0-alpha06'
implementation "androidx.navigation:navigation-compose:1.0.0-alpha02"
compiler extension version 1.0.0-alpha06Kshitij Patil
11/14/2020, 5:15 AMSe7eN
11/14/2020, 2:16 PMEric Ampire [MOD]
11/14/2020, 2:19 PMSe7eN
11/14/2020, 3:36 PMMihai Hrincescu
11/14/2020, 7:19 PMdrawContext.canvas.nativeCanvas()
?Gabriel
11/14/2020, 7:46 PMYann Badoual
11/14/2020, 8:02 PMjava.lang.IllegalStateException: Start/end imbalance
when using them
Wrapping the whole follow code into a conditional block instead fixes the issuezoha131
11/14/2020, 10:20 PMShohayTheme {
val navController = rememberNavController()
NavHost(navController = navController, startDestination = Route.Splash) {
composable(Route.Splash) {
val splashViewModel = hiltViewModel<SplashViewModel>()
SplashScreen(
viewModel = splashViewModel,
navigateToAuth = { navController.navigate(Route.Auth) },
navigateToHome = { navController.navigate(Route.Main) }
)
}
navigation(startDestination = Route.NestedAuth.Social, route = Route.Auth){
composable(Route.NestedAuth.Social) {
Text(text = "Social Flow")
}
}
composable(Route.Main) {
Text(text = "Main Flow")
}
}
}
Tlaster
11/15/2020, 3:54 AMitems
with LazyColumn
does not restore the scroll position when navigate back using navigation compose. Does anyone have the same issue?Tash
11/15/2020, 5:12 AMalpha07
& chrisbanes/accompanist v0.3.3.1 , loading a CoilImage
in this manner:
CoilImage(
contentScale = ContentScale.Crop,
data = "some image url",
fadeIn = true,
error = { Text("Could not load image") }
)
fails with:
skia: --- Failed to create image decoder with message 'unimplemented'
The result is that the image does not load, and the error Composable is shown.
Anyone else experiencing this?Mahdi
11/15/2020, 8:49 AMval items = viewModel.liveDataItems.observeAsState(initial = emptyList())
After user do some action I wanna expand that specific item. For do that I will tell viewModel update expandation field of selected item. Then I will update liveDataItems and want to expandations happens. I have two problem here, first making change to list items not trigger Live Data in compose so I have to replace all data with new that specific items is updated with isExpanded=true. Second issue is with tis way I will lose my scroll point and view will render from start. How I can handle expandation like this to haveVivek Sharma
11/15/2020, 11:24 AMPavel Marchenko
11/15/2020, 1:22 PMEditText
view with AndroidView
composable, when I press back button with EditText
in active state, KeyInputModifier
is crashing with "KeyEvent can't be processed because this key input node is not active."
Is there any information on what i'm doing wrong and how to fix this?
After a briefly looking into compose source code I was not able to find any handle to prevent this crash, so I'm just suppressing the crash on activity level inside of dispatchKeyEvent
method, is there a better workaround for the issue? (compose 1.0.0-alpha07)Ali Albaali
11/15/2020, 1:37 PMgrandstaish
11/15/2020, 2:07 PMTextField
component, and it internally needs a ScrollableColumn
so that users can scroll when the text height is greater than the container size. Having an internal ScrollableColumn
prevents me from putting this TextField
in a screen with scrollable content (i.e. most screens)grandstaish
11/15/2020, 2:07 PMTextField
component, and it internally needs a ScrollableColumn
so that users can scroll when the text height is greater than the container size. Having an internal ScrollableColumn
prevents me from putting this TextField
in a screen with scrollable content (i.e. most screens)TextField
, they just built their own ScrollableColumn
that doesn’t crash in this scenario?? 😄 Makes me feel like either Material is doing something bad, or ScrollableColumn
is being too restrictive.matvei
11/16/2020, 11:37 AMScrollableColumn
is allowed and supported as far as I'm aware. The problem you see arising because ScrollableColumn measures its children with infinite constraints, so you have to limit your child ScrollableColumn
to some height it order for it to work.
Having said that, putting ScrollableColumn
in TextField
to scroll might solve your issue short term, but it's more complicated than that. You need to be able to scroll when cursor is dragged, you need to be able to auto-scroll down or up when line is added/removed, that's why we embed scrolling logic inside TextField.
Since it's not a trivial task, in the upcoming releases we will port this logic to the BasicTextField
as well, so any TextField you use will have this logic build-in, not only material 🙂
Let me know if you have any questionsgrandstaish
11/16/2020, 12:11 PMBasicTextField
solves my main concern of having to maintain this code myself. Is there a public issue I can follow or anything? 👀matvei
11/16/2020, 12:32 PM