Cicero
05/10/2021, 1:43 PMtype = NavType.IntArrayType
I’m getting this crash because IntArray is not supported.
Funny enough I should be using ArrayList<Int>
This is really not intuitive, or am I not being intuitive? hahaDaniele B
05/10/2021, 3:09 PMNavHostController.navigate()
as in:
val navController = rememberNavController()
navController.navigate("detail")
It seems no recomposition is triggered.
What is the basis on which Compose is able to update the screen without a recomposition?
And how can we achieve the same in a Compose non-Android app?Nurseyit Tursunkulov
05/10/2021, 4:32 PMDenis Capkovic
05/10/2021, 4:44 PMModifier.weight(1f)
instead of Modifier.fillMaxSize()
when we want the component to take up as much space as is available (it is the only component of the parent)?Alexander Karkossa
05/10/2021, 5:57 PMAlexandru Hadăr
05/10/2021, 6:43 PMTextFields
and a Button
at the bottom of the screen (max space between the Button
and TextFields
). What I’m trying to achieve is that when keyboard is opened, the button will be pushed up till below the last `TextField`(with minimum space between), so the user only has to scroll a bit to push the button.
(🧵 with some attempts)Marco Pierucci
05/10/2021, 7:37 PMBilly Newman
05/10/2021, 8:33 PMNurseyit Tursunkulov
05/11/2021, 5:11 AMHeikki Rauhala
05/11/2021, 7:42 AMShivam Sethi
05/11/2021, 8:03 AMjames
05/11/2021, 8:41 AMCicero
05/11/2021, 9:26 AMDeepak Gahlot
05/11/2021, 9:48 AMcarbaj0
05/11/2021, 10:25 AMclass ProduceStateScopeImpl<T>(
state: MutableState<T>,
override val coroutineContext: CoroutineContext
) : ProduceStateScope<T>, MutableState<T> by state {
override suspend fun awaitDispose(onDispose: () -> Unit): Nothing {
try {
suspendCancellableCoroutine<Nothing> { }
} finally {
onDispose()
}
}
}
Why suspendCancellableCoroutine<Nothing> { }
is being executed?nglauber
05/11/2021, 1:03 PMTextField
are numeric and when I move the focus to the previous TextField
, the keyboard type changes very quickly to the alpha numeric and then changes again to the numeric… 😕
Here’s my code:
https://gist.github.com/nglauber/312052d2989aff50b9331aa6e0f816f7
And here’s the gif:FunkyMuse
05/11/2021, 2:14 PMval zIndex = if (state.targetValue == ModalBottomSheetValue.Hidden) {
0f
} else {
2f
}
ModalBottomSheetLayout(
modifier = Modifier.navigationBarsPadding().zIndex(zIndex)
it worked on beta03, it doesn't work anymore, is there an issue related to this?
My BottomNavigationComposable has a zIndex of 1fColton Idle
05/11/2021, 2:41 PMDialog
and try to morph it into alertDialog design, or is there a way to pass a composable into an AlertDialog that I'm missing?alexsullivan114
05/11/2021, 4:07 PMshadow
modifier as follows:
@Composable
@Preview
private fun ProfileItem() {
Box(modifier = Modifier.background(Color.White).padding(20.dp)) {
Image(
painter = painterResource(id = R.drawable.charles),
contentScale = ContentScale.Crop,
contentDescription = "Profile Image",
modifier = Modifier
.size(48.dp)
.shadow(8.dp, CircleShape)
)
}
}
This results in a circular avatar-esque image, but there's no shadow.
However, if I swap out the Image
Composable with a Text
Composable, I see a shadow:
@Composable
@Preview
private fun ProfileItem() {
Box(modifier = Modifier.background(Color.White).padding(20.dp)) {
Text("Testing shadow", modifier = Modifier.size(48.dp).shadow(8.dp, CircleShape))
}
}
I've tried playing around with padding, nesting boxes, and using a surface instead of the shadow modifier, all without any luck.
I'm sure I'm missing something obvious - any ideas?Neal Sanche
05/11/2021, 4:58 PMBilly Newman
05/11/2021, 5:02 PM<com.google.android.material.textfield.TextInputEditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="false"
android:textIsSelectable="false"
android:cursorVisible="false"
android:clickable="false"
android:inputType="textNoSuggestions"
android:text='@{value}'
android:onClick="@{() -> clickListener.invoke() }"/>
Marko Novakovic
05/11/2021, 7:00 PM+
. Problem I have with my current implementation is that top layer with cloud is consuming all inputs so I can’t interact with rest of the app. Do you have any ideas how to do this. Code in 🧵Luis Mierez
05/11/2021, 9:49 PMSteve
05/11/2021, 10:39 PMZhelyazko Atanasov
05/12/2021, 8:03 AMTextField
but when user clicks on it - don't show the keyboard and the cursor 🤔 On the same time have the "focused" highlight of the TextField
. I came across SofttwareKeyboardController class but it seems like it's suited for other use casesTigran Galstyan
05/12/2021, 10:20 AMPierre Kuhn
05/12/2021, 3:25 PMLilly
05/12/2021, 5:54 PMStateFlow
and MutableState
in viewmodel/presenter layer? Is there a rule of thumb when to use one over the other, are there any drawbacks to use the one or the other? It seems to me both work the same wayVince Rickey
05/12/2021, 5:57 PMAman Kapoor
05/13/2021, 7:04 AMAman Kapoor
05/13/2021, 7:04 AMAndrey Kulikov
05/13/2021, 10:52 AMAman Kapoor
05/13/2021, 10:56 AMAndrey Kulikov
05/13/2021, 11:04 AMAman Kapoor
05/13/2021, 11:10 AM