Nthily
04/08/2021, 7:32 PMzalewski.se
04/08/2021, 10:04 PMTextField
size so it’s adjusting to the size of the text that’s currently set. I thought that wrapContentSize()
would do the job but I couldn’t be more wrong 😬
So having this:
TextField(
modifier = Modifier.wrapContentSize(),
textStyle = TextStyle(textAlign = TextAlign.End),
value = text,
onValueChange = { text = it },
label = { Text("Label") }
)
Gave me such result in preview 👇 which arises 2 questions:
1. Why TextAlign.End
set it around 40% of the width and what is the empty space behind it?
2. Why Modifier.wrapContentSize()
doesn’t wrap it around the value or label at least? 🤔Mark Murphy
04/08/2021, 11:50 PMColton Idle
04/09/2021, 12:18 AMLilly
04/09/2021, 12:59 AMvar uiState: UiState by mutableStateOf(UiState.Loading)
private set
I also have 2 screens, each of them uses its own view model. viewModelScreenA and viewModelScreenB. When I print the uiState in both view models like:
init {
Timber.e("VM A - uiState: $uiState")
}
The uiState of both view models are identical UiState$Loading@220c954
. I would expect that they are different, not?elye
04/09/2021, 9:28 AMFloatTweenSpec
or tween<Float>
, … FloatSpringSpec
or spring<Float>
?escodro
04/09/2021, 12:40 PMnglauber
04/09/2021, 1:33 PMtryAwaitRelease()
on beta04. It’s always returning false… 🤔Nat Strangerweather
04/09/2021, 4:40 PMdewildte
04/09/2021, 6:06 PMBottomSheetScaffold
? Video of the erroneous behaviour in the thread.Gabriel
04/09/2021, 7:43 PMkotlin-gradle-plugin
are we meant to be using? I'm on 1.4.32 and experiencing some ... issuesizyaboi
04/09/2021, 10:25 PMrnett
04/10/2021, 3:28 AMrnett
04/10/2021, 4:43 AM@Immutable
) in a separate, common artifact? I have some data definitions in a common module that doesn't have compose dependencies, and would like to mark them as immutable.orangy
04/10/2021, 11:19 AMmaxValue
on ScrollState
because it’s internal… I’m using verticalScroll
modifier on my component, but can’t figure out how to set its limits…Olivier Patry
04/10/2021, 12:22 PMvalue, onValueChanged: () -> Unit
, extract it in a "state".
Does it ring a bell to someone?
Any advice on how to manage my use case? (I can detail more if needed)orangy
04/10/2021, 1:03 PMLayout
component, that does all the measurements and placements. Now, I want to draw some adornments on the canvas, kinda like drawBehind
, but I need to know placements of the children. How would I do it?Paul Woitaschek
04/10/2021, 7:23 PM@Compsable fun Counter()
But now I need to separate the logic and UI and need to create a counter class that is the actual counter and not the ui.
Intuitively I'd call that counter class Counter
.
Now having both of these named the same is obviously a bad idea, but what's the solution to this?
Consistently suffixing every composable ui function as CounterUI
? Or CounterView
? How do you handle this?Zhelyazko Atanasov
04/11/2021, 5:29 AM@Preview
is grayed out and inactive? Using AS Canary 14 with Compose beta04
(tried beta03
- same thing). Is this a known issue?loloof64
04/11/2021, 10:14 AMrememberSaveable
, but how should I build such object ? Let's say for data class Point(val x: Int, val y:Int)
? Because there is not any example in the documentation, and I did not understand this sentence (build a custom object saver
), what interface should the saver have ? What is the Android class/object responsible for such interface ? Should I create a Bundle
myself ?Slackbot
04/11/2021, 2:04 PMorangy
04/11/2021, 4:52 PMPaul Woitaschek
04/11/2021, 7:07 PMandbapps
04/11/2021, 8:38 PMIntrinsicSize
and Arrangement.SpacedBy
(code in thread)james
04/12/2021, 12:14 AMLilly
04/12/2021, 1:37 AMJason Ankers
04/12/2021, 3:39 AMFlingConfig
(now FlingBehaviour
?) but I cant see how I can specify a list of anchors or snap points easilyShivam Sethi
04/12/2021, 5:44 AMAbhishek Dewan
04/12/2021, 6:19 AMallan.conda
04/12/2021, 9:17 AMcompose-navigation
? I could get the results from NavBackStackEntry.savedStateHandle
, but I’m not sure where that code belongs… Do you pass it as state?
https://github.com/android/compose-samples/blob/main/Owl/app/src/main/java/com/example/owl/ui/NavGraph.kt#L75-L85allan.conda
04/12/2021, 9:17 AMcompose-navigation
? I could get the results from NavBackStackEntry.savedStateHandle
, but I’m not sure where that code belongs… Do you pass it as state?
https://github.com/android/compose-samples/blob/main/Owl/app/src/main/java/com/example/owl/ui/NavGraph.kt#L75-L85Ian Lake
04/12/2021, 2:09 PMsavedStateHandle.getLiveData("key").observeAsState()
allan.conda
04/12/2021, 4:21 PM