Fixed
Status Update
Comments
ry...@google.com <ry...@google.com>
pr...@google.com <pr...@google.com> #4
The release notes documentation has been edited to clarify this change in behavior for line height.
To support non-standard text sizes, we encourage users to follow the Material design system and use a different style = LocalTextStyle.current.copy(lineHeight = TextUnit.Unspecified)
, or create a custom Typography
entirely.
Description
Android Studio Build:#AI-211.7628.21.2111.8139111, built on February 2, 2022
Kotlin version:
Steps to Reproduce:
1.run the code below in MainActivity at onCreate Method, use "setContent{ Test2() }"
2.run the project
3.you will find that your BottomDrawer will open when you run the app, but the code is declared that the BottomDrawer is closed
the code:
@ExperimentalMaterialApi
@Composable
fun Test2() {
val drawerState = rememberBottomDrawerState(initialValue = BottomDrawerValue.Closed)
BottomDrawer(
drawerState = drawerState,
gesturesEnabled = true,
drawerContent = {
ComposeWebView(
url = "
modifier = Modifier.fillMaxWidth()
)
}
) {
}
}
@Composable
private fun ComposeWebView(modifier: Modifier = Modifier, url: String) {
AndroidView(
modifier = modifier,
factory = { context ->
WebView(context).apply {
settings.javaScriptEnabled = true
settings.javaScriptCanOpenWindowsAutomatically = true
settings.domStorageEnabled = true
settings.loadsImagesAutomatically = true
settings.mediaPlaybackRequiresUserGesture = false
settings.allowFileAccess = true
webViewClient = WebViewClient()
loadUrl(url)
}
},
update = { webView ->
webView.loadUrl(url)
}
)
}