amar_1995
01/13/2020, 7:24 AMVerticalScroller
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
@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()
}
}
}
}
drawerContent
of ModalDrawerLayout
.matvei
01/13/2020, 11:54 AMamar_1995
01/13/2020, 12:36 PMmatvei
01/13/2020, 12:37 PMamar_1995
01/13/2020, 12:45 PMmatvei
01/13/2020, 12:46 PMRoar Gronmo
01/13/2020, 1:15 PM