Daniel Candeias
07/12/2021, 4:07 PMdetectTapGestures
how can i disallow user to pan/translate the content out of its bounding box?
I have scale working with translations as well but the user is able to translate the image out of the screen. How can I set some limits for translation?Artur Schwarz
07/12/2021, 5:50 PMChris Fillmore
07/12/2021, 6:49 PMcomposable(...) {
val context = LocalContext.current
SideEffect {
CustomTabsIntent.Builder().build().launchUrl(context, myUrl)
}
}
I’ll be expanding on this a bit to warm up the browser, etc, but is this basically what I need to do? Call launchUrl()
from inside the Composable?smallshen
07/12/2021, 9:55 PMnglauber
07/13/2021, 12:17 AMState
for each field in ViewModel and simply access them from the screen.
3️⃣ Encapsulate these 10 fields in a data class, expose one single `Flow`/`LiveData` and each “setter” create a copy
of this data class instance to update the state.
4️⃣ Encapsulate these 10 fields in a data class, each field is a state, ViewModel has an instance of this class and you simply access it from the screen.
5️⃣ Other (please explain)Abhishek Dewan
07/13/2021, 5:51 AMAkram Bensalem
07/13/2021, 7:00 AMknthmn
07/13/2021, 7:29 AMui-tooling
split, is the following dependency declaration the "most correct" if I also need to annotate my composables with @Preview
?
implementation("androidx.compose.ui:ui-tooling-preview:$compose_version")
debugImplementation("androidx.compose.ui:ui-tooling:$compose_version")
julioromano
07/13/2021, 8:21 AMJeff
07/13/2021, 9:28 AMAndré Thiele
07/13/2021, 1:07 PMPeter Mandeljc
07/13/2021, 3:49 PMdimsuz
07/13/2021, 5:19 PMvalue
) class, can I mark it as @Immutable
? Will this property transfer to the wrapped class and be understood accordingly by the Compose runtime later on?Peter Mandeljc
07/13/2021, 6:22 PMColumn(modifier = Modifier.clickable { Timber.d("click") }) {
TextField(value = "smth", onValueChange = {})
}
John O'Reilly
07/13/2021, 6:56 PMnatario1
07/13/2021, 7:33 PMBox(Modifier.fillMaxSize()) {
Box(Modifier.fillMaxSize().clickable { error("Yay!") })
Box(Modifier.fillMaxSize().pointerInput(Unit) {})
}
I mean, even if parent Box decides that the second child should get events first (which is questionable, but okay), why does pointerInput
block the flow?Eric Ampire [MOD]
07/13/2021, 8:17 PMCard
and Surface have the onClick
parameter how can I define an onLongClick
assuming that the code below does not work
Modifier.combinedClickable(
onLongClick = {
Timber.e("Long Click")
}
)
Modifier.genericClickableWithoutGesture
that support onLongClick
is marked as internalAnthony
07/13/2021, 9:37 PMnglauber
07/13/2021, 10:39 PMModalBottomSheetLayout
collapses when back key is pressed? 🤔df w
07/14/2021, 1:30 AMtad
07/14/2021, 1:32 AMpending composition has not been applied
before? Stack trace in threadColton Idle
07/14/2021, 1:55 AMursus
07/14/2021, 7:38 AMState(val greeting: String) and just render thr greeting
State(val name: String) render "Hello $state.name"
State(val user: User) render "Hello $state.user.name"
TLDR; do you format in viewmodel or in composables?Rak
07/14/2021, 8:10 AMpawegio
07/14/2021, 10:35 AMAlertDialog
takes a full width with no horizontal padding by default?Peter Mandeljc
07/14/2021, 12:37 PMTiago Nunes
07/14/2021, 3:50 PMjim
07/14/2021, 3:58 PM@Immutable
is useful outside of just Compose.dambakk
07/14/2021, 4:18 PMLazyListState
?jw
07/14/2021, 5:52 PMjw
07/14/2021, 5:52 PMalorma
07/14/2021, 6:05 PMjw
07/14/2021, 6:11 PMdimsuz
07/14/2021, 6:14 PMjw
07/14/2021, 6:16 PMalorma
07/14/2021, 6:33 PMeygraber
07/14/2021, 10:02 PM