FunkyMuse
03/08/2022, 6:54 AMbrabo-hi
03/09/2022, 12:53 AMlazyListState
how could we change set the scroll animation rate when scrolling to topandrew
03/09/2022, 1:41 AMTolriq
03/09/2022, 12:16 PManiruddha dhamal
03/09/2022, 2:27 PMLuke
03/09/2022, 7:35 PMActivityTestRule
and a ComposeTestRule
. We recently migrated some TextViews to Compose and now a lot of tests fail with: androidx.test.espresso.IdlingResourceTimeoutException: Wait for [Compose-Espresso link] to become idle timed out
Sam
03/10/2022, 1:27 AMSam
03/10/2022, 7:16 AMfirebase-android-sdk
https://github.com/firebase/firebase-android-sdk/issues/3517Hardeep Singh
03/10/2022, 12:08 PMlouiscad
03/10/2022, 1:07 PMbuildFeatures.compose = true
to be ignored?
Compiling Compose code fails as if I didn't enable it, and colors don't show in the gutter for Color(0xWHATEVER)
calls.Alexander Black
03/10/2022, 5:34 PMAlexander Black
03/10/2022, 11:28 PMRangeSlider
if you constrain its width it doesn’t render the second range button, because it goes outside of that space. Also if you don’t set Modifier.fillMaxWidth(0.85f)
it will push anything after it out of view which I’m pretty sure is not the intended behaviour. I’m using Compose 1.1.1. Also if you constrain the max width the progress indication get’s really wacky.Icyrockton
03/11/2022, 1:30 AMAnudeep Ananth
03/11/2022, 3:24 AMLuke
03/11/2022, 4:23 PM@get:Rule
val activityRule = createAndroidComposeRule<SplashScreenActivity>()
But I have some individual setup for each test to do before the activity is launched. So I would like to, in my @Test
function, do some initialization, launch the test, and then perform clicks, assertions, etc.Nick
03/11/2022, 8:21 PMVisualTransformation
. In the textfield, when it sees {{user-id=1234}}
it’ll convert it to “@username”. What’s the best way to calculate the offset using originalToTransformed
and transformedToOriginal
?Colton Idle
03/13/2022, 4:46 AMRobert Menke
03/13/2022, 5:59 PMScaffold
if needed. That eliminated the problem of having to awkwardly animate the bottom/top nav and produces the smooth animation one would expect. I’m not sure if this is or isn’t a good practice, but it seems to get the job done.Bradleycorn
03/14/2022, 4:56 PMBen Trengrove [G]
03/15/2022, 2:22 AMdead.fish
03/15/2022, 12:59 PMLazyRow
implementation where I prevent simultanous clicks on single items via a LaunchedEffect
(key is a boolean mutable state, if the state gets false, i.e. some item is clicked and clicking is now disabled, I delay for 100ms and then set the state back to enabled). How would I test such a thing with ComposeTestRule
? My initial idea was to use ComposeTestRule
s mainClock
and call adanceTimeBy(101)
, but that doesn’t seem to work at all (not even with double the time). Any pointers?spierce7
03/16/2022, 2:59 PMPablo
03/16/2022, 6:39 PMMicko Cabacungan
03/16/2022, 7:04 PManimateDpAsState
, but it seems to be running right when the targetValue
changes even though the view itself is not yet visible
I am using both Android classic views + compose inter-operably, basically what Im doing is, I turn off this ComposeView
until a condition is met, when this condition is met, I then turn the ComposeView
visibility to true but it seems like the animation already happened before the view was visible on screen? Not sure whats happening but my log in finishedListener
is not executingAfzal Najam
03/17/2022, 10:58 PMPager
/`LazyList`?
I have a LazyRow
in the contents of a Pager
and it scrolls the pager while navigation through the LazyRow
using D-pad/arrow keys.iamthevoid
03/18/2022, 8:31 AMdanieeh
03/18/2022, 9:42 AM2022-03-17 17:03:24.046 12464-12464/com.compose.playground E/MonitoringInstr: Exception encountered by: Thread[main,5,main]. Dumping thread state to outputs and pining for the fjords.
java.lang.IllegalStateException: Vertically scrollable component was measured with an infinity maximum height constraints, which is disallowed. One of the common reasons is nesting layouts like LazyColumn and Column(Modifier.verticalScroll()). If you want to add a header before the list of items please add a header as a separate item() before the main items() inside the LazyColumn scope. There are could be other reasons for this to happen: your ComposeView was added into a LinearLayout with some weight, you applied Modifier.wrapContentSize(unbounded = true) or wrote a custom layout. Please try to remove the source of infinite constraints in the hierarchy above the scrolling container.
for now I made a workaround to avoid the recomposition fixing the size.. but its not ideal.. any pointers on how to fix this? should I file an issue somewhere?? thanks again!
some logs of the recomposition updates:
Am I recomposing??
Box boxMaxWidth = 1280.0.dp, maxWidth = 1280.0.dp
Box maxWidth2 = 1280.0.dp
Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 833.5.dp
Box maxWidth2 = 833.5.dp
Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 1280.0.dp
Box maxWidth2 = 833.5.dp
Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 833.5.dp
Box maxWidth2 = 833.5.dp
Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 833.5.dp
Box maxWidth2 = 833.5.dp
Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 1280.0.dp
Box maxWidth2 = 833.5.dp
Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 833.5.dp
Box maxWidth2 = 833.5.dp
Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 1280.0.dp
Box maxWidth2 = 833.5.dp
Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 833.5.dp
Box maxWidth2 = 833.5.dp
Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 1280.0.dp
Box maxWidth2 = 833.5.dp
Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 833.5.dp
Box maxWidth2 = 833.5.dp
and the branch where is reproduced:
https://github.com/danimontoya/compose-playground/tree/simplifiedPablo
03/18/2022, 10:35 AMwidth = Dimension.fillToConstraint
and then say that the first box has the min width as the second Box? The only constraint is that the first box can group and it makes the second one bigger, but the min width of the first one should be the same width as the second box. I add a reproducible code down below.
ConstraintLayout() {
val (title, description) = createRefs()
Box(
modifier = Modifier
.padding(start = 4.dp)
.background(color = Red)
.padding(horizontal = 16.dp)
.constrainAs(title) {
top.linkTo(<http://parent.top|parent.top>)
start.linkTo(parent.start)
end.linkTo(parent.end)
width = Dimension.fillToConstraints
},
contentAlignment = Alignment.Center
) {
Text(text = "Dynamic value", maxLines = 1)
}
Box(
modifier = Modifier
.padding(end = 4.dp)
.background(Color.Magenta)
.padding(
bottom = 5.dp, start = 8.dp, end = 16.dp, top = 4.dp
)
.constrainAs(description) {
top.linkTo(<http://title.top|title.top>, margin = 16.dp)
start.linkTo(parent.start)
end.linkTo(parent.end)
bottom.linkTo(parent.bottom)
},
contentAlignment = Alignment.Center
) {
Text(text = "Fixed Value")
}
}
Benjamin Deroche
03/18/2022, 12:14 PMDropdownMenu
and then a TextField
. How can I make it to automatically focus the TextField
and show keyboard after something was selected in the DropdownMenu
?
I tried to set a FocusRequester
to the `TextField`'s Modifier
and call focusRequester.requestFocus()
from DropdownMenuItem.onClick()
but it only focus the TextField
and does not show the keyboard automatically.Afzal Najam
03/19/2022, 11:17 PMLazyRow
?