Abhishek Kumar
01/03/2022, 7:24 AMHorizontalPager
with TabRow
in my project. My HorizontalPager uses default fling behaviour from PagerDefaults.flingBehavior(state)
. I have not overridden the fling behavior.
This is how the code looks like:
val pagerState = rememberPagerState()
HorizontalPager(
count = profileState.tabs.size,
state = pagerState
) {..grid item..}
I have to scroll very hard to scroll between the pager items. I want the pager to scroll to next/previous screen on even slight scroll.
After debugging and logging, I found that initialVelocity
in performFling
method is coming out to be -0.0
(same for left and right fling) all the time for some reason.
Can anyone help with this?MRSasko
01/03/2022, 9:04 AMimplementation "com.google.accompanist:accompanist-navigation-animation:0.22.0-rc"
AnimatedNavHost(navController, startDestination = Routes.Main.route,
popEnterTransition = { EnterTransition.None },
popExitTransition = { ExitTransition.None },
enterTransition = { EnterTransition.None },
exitTransition = { ExitTransition.None }
) {
bottomNavGraph(navController = navController)
userNavGraph(navController = navController)
}
Vivek Sharma
01/03/2022, 6:16 PMLazyColumn
and having Zoomable - my custom composable having pinch to zoom
as each item in items{}
So when I zoom the first item, it is showing behind others , I think they are being stacked inside Box
, so how can I overcome this thing?
See this 👇farmerbb
01/03/2022, 6:23 PMMehdi Haghgoo
01/03/2022, 6:44 PMmattinger
01/03/2022, 6:57 PMValueAnimator.ofArgb
function. I’m not finding an equivalent in compose (at least not easily)Rick Regan
01/03/2022, 9:04 PMFunkyMuse
01/03/2022, 9:34 PMColton Idle
01/03/2022, 9:53 PMFunkyMuse
01/03/2022, 10:33 PMBottomSheet
as destination with an AnimatedNavHost, after using navigateUp the sheet scrim is still visible but the bottom sheet is dismissed, it works fine if you click on the scrim (both are dismissed)Rafs
01/03/2022, 10:34 PMTextField
property is responsible for drawing the thin horizontal line when in unfocused mode? It disappears when the textfield is focused. Right image is focused, left is unfocusedColton Idle
01/04/2022, 12:10 AMmyanmarking
01/04/2022, 12:13 PMStylianos Gakis
01/04/2022, 1:46 PMloloof64
01/04/2022, 2:35 PMmattinger
01/04/2022, 3:17 PMAnkit Shah
01/04/2022, 4:36 PMjeff
01/04/2022, 5:52 PM@Preview
? We normally use Moshi to deserialize but that doesn't seem to work in previews because codegen hasn't run. I could construct the resulting (post-deserialization) object manually, but the JSON has enough nesting that it's very cumbersome.ste
01/04/2022, 10:30 PMCompose Runtime internal error
with this basic snippet, only on release builds. Would you confirm there's nothing I'm missing so I can open an issue?
@Composable
fun Main() {
Bug(items = listOf(1, 2, 3)) {
BasicText(text = it.toString())
}
}
@Composable
inline fun <T> Bug(items: List<T>, crossinline content: @Composable (item: T) -> Unit) {
for (item in items) content(item)
}
mattinger
01/05/2022, 12:10 AMbrabo-hi
01/05/2022, 12:17 AMval keyboardController = LocalSoftwareKeyboardController.current
keyboardController?.hide()
allan.conda
01/05/2022, 3:44 AMAndy Himberger
01/05/2022, 5:24 AMDominaezzz
01/05/2022, 9:23 AMAbhishek Kumar
01/05/2022, 10:24 AMcollectAsLazyPagingItems().itemCount
returns 0 for sometime even after updating the Flow<PagingData<Item>
. After sometime only itemCount returns the actual value. any lead on this?Ankit Shah
01/05/2022, 11:06 AMLilly
01/05/2022, 1:24 PMTextFieldColors
to apply the color for onSecondary
instead of onPrimary
. I tried with TextStyle.color
or wrapping it in a Surface and setting contentColor but nothing works. The text/label/indicator color is always black. My onSecodary
color is white.
Column(modifier = Modifier.padding(8.dp)) {
TextField(
modifier = Modifier.fillMaxWidth(),
value = password,
onValueChange = { password = it },
label = { Text("Password") },
visualTransformation = PasswordVisualTransformation(),
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password),
)
}
Any ideas?myanmarking
01/05/2022, 1:37 PMYev Kanivets
01/05/2022, 2:16 PMLazyColumn
/ LazyRow
. Basically, are underlying views in view hierarchy are ever reused for new views while scrolling? Or do they always created from scratch? RecyclerView
created (onCreateViewHolder
) views only for those which are on the first screen and reused them (onBindViewHolder
) when scrolling.hfhbd
01/05/2022, 2:27 PMdata class Foo(val bar: List<Bar>) { data class Bar(val i: Int) }
Can Compose generate the difference of Foo(emptyList())
and Foo(listOf(Bar(1))
and Foo(listOf(Bar(42))
?
At the end, I would like to use Compose as a general tree diff tool with my own tree implementation by using difference instances of my tree.hfhbd
01/05/2022, 2:27 PMdata class Foo(val bar: List<Bar>) { data class Bar(val i: Int) }
Can Compose generate the difference of Foo(emptyList())
and Foo(listOf(Bar(1))
and Foo(listOf(Bar(42))
?
At the end, I would like to use Compose as a general tree diff tool with my own tree implementation by using difference instances of my tree.Zach Klippenstein (he/him) [MOD]
01/07/2022, 5:33 PMhfhbd
01/08/2022, 10:03 AMZach Klippenstein (he/him) [MOD]
01/10/2022, 8:07 PM