`VerticalScroller` is not working properly with `M...
# compose
a
VerticalScroller
is not working properly with
ModalDrawerLayout
When
drawerContent
data wrap around verticalScroller whole view moves to center. I had tried to incoperate the samething in
jetnews
app. Updated the
AppDrawer
function
Copy code
@Composable
private fun AppDrawer(
    currentScreen: Screen,
    closeDrawer: () -> Unit
) {
    VerticalScroller() {
        Column(modifier = Expanded) {
            HeightSpacer(24.dp)
            Row(modifier = Spacing(16.dp)) {
                VectorImage(
                    id = R.drawable.ic_jetnews_logo,
                    tint = (+MaterialTheme.colors()).primary
                )
                WidthSpacer(8.dp)
                VectorImage(id = R.drawable.ic_jetnews_wordmark)
            }
            Divider(color = Color(0x14333333))
            DrawerButton(
                icon = R.drawable.ic_home,
                label = "Home",
                isSelected = currentScreen == Screen.Home
            ) {
                navigateTo(Screen.Home)
                closeDrawer()
            }

            DrawerButton(
                icon = R.drawable.ic_interests,
                label = "Interests",
                isSelected = currentScreen == Screen.Interests
            ) {
                navigateTo(Screen.Interests)
                closeDrawer()
            }
        }
    }
}
After adding the vertical scroller
I noticed this issue is occuring only when using in
drawerContent
of
ModalDrawerLayout
.
m
Oh, I think it's because the Container is centering by default, and Drawer uses it for it's child. Can you file a bug please for this?
a
Okay
m
(As a workaround, you can add LayoutExpandedHeight modifier to scroller, this should help)
a
m
Thanks
r
I starred your issuetracker issue
❤️ 1