Brian Donovan
12/03/2021, 12:57 PMvoben
12/03/2021, 1:26 PMTextField
since it doesn’t have an elevation param?Rick Regan
12/03/2021, 3:49 PM.verticalScroll(scrollState)
.
• val scrollState = rememberScrollState()
does not survive a configuration change.
• val scrollState = rememberSaveable { ScrollState(0) }
gets an exception "ScrollState@fb46372 cannot be saved using the current SaveableStateRegistry".
• val scrollState = ScrollState(0)
globally outside of any Composable works, but this is putting the scroll state outside the scope of the Composable. Is it OK to do that? Is there another way?Brian Donovan
12/03/2021, 4:42 PMColton Idle
12/03/2021, 4:45 PMColton Idle
12/03/2021, 4:51 PMrobnik
12/03/2021, 5:51 PMJoseph Hawkes-Cates
12/03/2021, 6:09 PMIstvan Beri
12/03/2021, 7:03 PM@Composable
fun TestScreen() {
Column(
modifier = Modifier
.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally
) {
Image(
painter = rememberImagePainter("<https://cdn.vox-cdn.com/uploads/chorus_image/image/47684009/Screenshot_2014-07-19_15.24.57.0.png>"),
contentDescription = null,
modifier = Modifier
.fillMaxHeight(0.4f)
)
Button(onClick = { }) { }
}
}
If I add a .verticalScroll(rememberScrollState())
modifier to the Column
the image doesn't show up anymore, only the button. What am I doing wrong or what do I miss?brabo-hi
12/03/2021, 7:33 PMnavController.navigate("nextPage") {
popUpTo("currentPage") { inclusive = true }
}
//and
navController.navigateUp()
navController.navigate("nextPage")
Tolriq
12/03/2021, 8:31 PMJesse Hill
12/04/2021, 1:37 AMverticalScroll
modifier. I put the code in this gist and will comment with my findings as I explore why this is happening.spierce7
12/04/2021, 3:23 AMspierce7
12/04/2021, 4:52 AMFlorian
12/04/2021, 8:30 AMYASAN
12/04/2021, 1:33 PMcompose-navigation
. I have a relatively heavy video player route which can be opened from a few other routes. Is there a way to always keep that route open in the background so it doesn't have to initialize every time? I just want to change the videoId
used in the route every time its opened.Zun
12/04/2021, 2:04 PMinit
?Colton Idle
12/05/2021, 12:57 AMyschimke
12/05/2021, 10:20 AMval taskSeries by viewModel.taskSeries(taskSeriesId).collectAsState(initial = null)
if (taskSeries != null) {
Text(text = taskSeries.name)
yschimke
12/05/2021, 10:20 AMSher Sanginov
12/05/2021, 6:55 PMThinking in Compose
documentation similar to Thinking in React
and show an entire process of building some feature using Compose?
Here's the React one for reference: https://reactjs.org/docs/thinking-in-react.html
I found React documentation very useful because:
1. It shows how to break your UI into several components (or Composables)
2. Identify The Minimal (but complete) Representation Of UI State
3. Explains where state should live (concept of state hoisting in Compose)
4. Explains inverse data flow
There is already Thinking in compose
documentation (https://developer.android.com/jetpack/compose/mental-model) out there but it explains the concepts with small examples unlike React's full-screen searchable product data table example.
Thank youHumphrey
12/05/2021, 8:34 PMrsktash
12/05/2021, 11:27 PMRafiul Islam
12/06/2021, 8:19 AMhttps://www.youtube.com/watch?v=09qjn706ITA&t=285s&ab_channel=AndroidDevelopersfor▾
K Merle
12/06/2021, 9:01 AMste
12/06/2021, 9:31 AMnavigation-compose
? I feel like it clashes with "thinking in compose" mindset; are there third-party alternatives?Pavle Joksovic
12/06/2021, 1:17 PMFlorian
12/06/2021, 2:13 PMMateusz Apacki
12/06/2021, 2:20 PMTolriq
12/06/2021, 3:21 PMTolriq
12/06/2021, 3:21 PMIan Lake
12/06/2021, 3:47 PMTolriq
12/06/2021, 3:50 PM