[英]How to change the drawer size in ModalDrawer (Jetpack compose)?
Is there any way to change the drawer size in ModalDrawer?有什么办法可以改变 ModalDrawer 中的抽屉尺寸吗? I spent my whole day looking for it but couldn't find any way
我花了一整天的时间寻找它,但找不到任何方法
Try to use modifier:尝试使用修饰符:
setContent {
MaterialTheme {
ModalDrawer(
modifier = Modifier
.width(180.dp)
.height(200.dp),
drawerShape = MaterialTheme.shapes.small,
drawerContent = {
Column {
Text("Hello world")
}
}) {}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.