Compose material3 OverScroll Shows in all 4 directions

ADM

I am using meterial3 with Compose . I found that all the Scrollable Composable Showing overscroll effect in all 4 directions regardless of scrolling direction. that goes for Column, LazyColumn, LazyVerticalGrid etc ..

I m not using anything custom to override overscroll effect. i can not figure out whats causing this behavior . i will add an example code below with LazyVerticalGrid which is causing this behavior . Since this is vertical grid it should show over scroll only vertically(to and bottom) but it also show it horizontally (left and right)..

Any direction on this will be appreciated.

@Composable
@Destination
fun FavoritesScreen(navigator: DestinationsNavigator) {
val favoritesViewModel: FavoritesViewModel = hiltViewModel()
val favoritesLiveData =
    favoritesViewModel.favoritesLiveData.observeAsState(initial = null)
if (favoritesLiveData.value != null) {
    if (favoritesLiveData.value!!.isEmpty()) {
      // Show empty view
    } else {
        LazyVerticalGrid(
            contentPadding = PaddingValues(
                12.dp,
                12.dp,
                12.dp,
                20.dp
            ),
            columns = GridCells.Fixed(2),
            horizontalArrangement = Arrangement.spacedBy(12.dp),
            verticalArrangement = Arrangement.spacedBy(12.dp),
        ) {
            item(span = { GridItemSpan(2) }) {
                Spacer(modifier = Modifier.windowInsetsTopHeight(WindowInsets.statusBars))
                Text(
                    text = stringResource(id = R.string.favorites),
                    style = MaterialTheme.typography.headlineMedium,
                    modifier = Modifier.padding(top = 20.dp)
                )
                ColumnSpacer(value = 10)
            }
            items(favoritesLiveData.value!!) { game ->
                // grid Item
            }
        }
    }
} 
}
Code Poet

You may need to update your Compose version. This was a known issue in Compose 1.3.0-alpha01, which was fixed subsequently.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Jetpack Compose Material3 disabled ListItem

Can ListItem leadingContent be top aligned in Jetpack Compose Material3?

Import error for Material3 in Jetpack Compose Android Project

Material3 theme in jetpack compose gives different color

How to set Background Color for Material3 TabRow in Android Compose?

Android Jetpack Compose: Can't find OutlinedTextField in Empty Compose Activity (Material3)

How to recognize swipe in all 4 directions

How to enable swiping on all 4 directions in the Dismissible Widget in Flutter?

How to accelerate and decelerate an object in all 4 directions in tkinter?

Expand box in all directions

Marker on all of polyline from Google maps directions V3

Chrome mobile all children of body overscroll-behavior bug

Mouse out is not working with all directions

Move background with the player in all directions

Listview shows 4 records. DataGridView shows 3 records?

Material3 IconButton fill color

css background with 3 directions

Divider in compose material 3

Gremlin 3 - get all incoming and outgoing vertices, including their edges and directions and including vertices without edges

Jetpack Compose Material 3 Error . Could not resolve all files for configuration ':app:debugRuntimeClasspath'

For some migrations, why `sqlmigrate` shows empty, or the same SQL both directions?

Unable to freedraw perfectly in all directions using Fabricjs

R find all possible directions given dimensions

JQuery drag/swip div in all directions

How to be able to resize image in all directions?

Make a div grow in all directions with CSS?

OpenCV dilate() function not closing the gaps in all directions

Maze Solving Algorithm does not work with 4 directions

Keyboard arrow navigation through images in the 4 directions