vanpra
07/02/2020, 9:29 PMLilly
07/03/2020, 12:36 AMval isScanning: Boolean by viewModel.isScanning.collectAsState() // viewModel.isScanning is of type StateFlow<Boolean>
without an initial value? I have multiple locations where this behaviour makes me trouble. Or to be more concrete: When I write something like this below my state:
if (isScanning) viewModel.stopScan() else viewModel.startScan()
it should not trigger stopScan()
nor startScan()
when composable function is called. Instead it should trigger on next value change.allan.conda
07/03/2020, 10:13 AMrajesh
07/03/2020, 1:40 PMnglauber
07/03/2020, 6:08 PMJoe Masilotti
07/03/2020, 11:42 PMThis is expected to be replaced by the navigation component, but for now handle navigation manually.What is “the navigation component?”
romainguy
07/04/2020, 4:48 AMLazyColumItems
nglauber
07/04/2020, 2:16 PMJoe Masilotti
07/04/2020, 2:43 PMdhimandasgupta
07/04/2020, 5:59 PM@Composable
fun RenderArticle(article: ArticleUIModel) {
Divider(thickness = 8.dp, color = MaterialTheme.colors.surface)
Surface(shape = shapes.medium, elevation = 8.dp, color = MaterialTheme.colors.surface, modifier = Modifier.fillMaxWidth()) {
Column(modifier = Modifier.padding(8.dp)) {
Text(
text = article.title,
style = MaterialTheme.typography.h6,
color = MaterialTheme.colors.onSurface,
modifier = Modifier.padding(bottom = 4.dp)
)
Divider(thickness = 2.dp, color = MaterialTheme.colors.surface)
Text(
text = article.description,
style = MaterialTheme.typography.body1,
color = MaterialTheme.colors.onSurface,
modifier = Modifier.padding(top = 4.dp)
)
}
}
Divider(thickness = 8.dp, color = MaterialTheme.colors.surface)
}
Sergey Y.
07/04/2020, 10:20 PMHero Animation
from Flutter
or Shared Element Transition
from Android SDK
?nglauber
07/05/2020, 2:58 PMA
and this composable calls B
which calls C
. Is there a way to change the state in C
? When we had @Model
we just need to update attribute and it worked…AG
07/05/2020, 3:40 PMLazyRowItems
with wrap content
inside LazyColumnItems
work correctly. In this example I have a row with images where each image has width 100dp. When I’m not passing modifier value with height in LazyRowItems
it shows only one row and Text is not rendering , also it’s possible to scroll the page, but when I’m passing modifier with preferredHeight
all works correctly, wrapContentHeight
not working also.
LazyColumnItems(items = List(size = 30, init = { it })) { column ->
if (column % 2 == 0) {
LazyRowItems(
items = List(size = 30, init = { it })
//modifier = Modifier.preferredHeight(100.dp)
) { row ->
Image(
asset = imageAsset,
modifier = Modifier.wrapContentHeight(100.dp).aspectRatio(1f)
)
}
} else {
Text(text = "$column")
}
}
nglauber
07/05/2020, 5:37 PMLazyColumnItems
?
I’m using a TabRow
to display two tabs and each one display a list of content. When I swap between the tabs, the scroll position of the list is lost.andylamax
07/05/2020, 11:12 PMBrady Aiello
07/06/2020, 12:06 AMMadhava
07/06/2020, 1:01 AMHarish Gupta
07/06/2020, 2:46 AMallan.conda
07/06/2020, 9:47 AMbohregard
07/06/2020, 1:56 PMJoost Klitsie
07/06/2020, 2:04 PMBaseComponent
in itself basically is a lifecycleOwner, observes the parent's lifecycleowner (so copies those and will call on_destroy when onDispose is called on itself) and creates the dependency graph (by extending the parent's dependency graph). Does anyone have any pointers here? 🙂Bacho Kurtanidze
07/06/2020, 2:37 PMaipok
07/06/2020, 5:58 PMDropdown
composable, but how to put everything together inside it is not clean. How to track selected item and modify it on selectofalvai
07/06/2020, 7:10 PMAnkur Gupta
07/06/2020, 7:51 PMdrawShadow()
modifier? I’m trying to make neumorphism design components. It would be great to have more control on shadows similar to the box-shadow
property in CSS.bohregard
07/06/2020, 9:17 PMvanpra
07/07/2020, 3:06 PMzak.taccardi
07/07/2020, 4:13 PM@Compose
support side effects, like launching a dialog or a Snackbar
that auto-dismisses itself after a short time?chris
07/07/2020, 4:30 PMcomposeOptions {
kotlinCompilerVersion "1.3.70-dev-withExperimentalGoogleExtensions-20200424"
kotlinCompilerExtensionVersion "0.1.0-dev13"
}
Where is that resolved from? Is it packaged with Studio?romainguy
07/07/2020, 4:33 PMromainguy
07/07/2020, 4:33 PMchris
07/07/2020, 4:35 PMromainguy
07/07/2020, 4:51 PM