This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun CustomWebView(modifier: Modifier = Modifier, | |
url:String, | |
onBack: (webView:WebView?) -> Unit, | |
onProgressChange: (progress:Int)->Unit = {}, | |
initSettings: (webSettings:WebSettings?) -> Unit = {}, | |
onReceivedError: (error: WebResourceError?) -> Unit = {}){ | |
val webViewChromeClient = object:WebChromeClient(){ | |
override fun onProgressChanged(view: WebView?, newProgress: Int) { | |
//回调网页内容加载进度 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 组合式BottomSheetDialog | |
* @param sheetModifier 仅影响BottomSheet布局,不影响mainContent布局 | |
* @param sheetElevation bottomSheet背景的阴影 | |
* @param sheetShape bottomSheet的视图shape | |
* @param mainContent activity的contentView | |
* @param sheetContent bottomSheet弹出来的contentView | |
* @param topLeftIcon 内置的顶部左侧Icon | |
* @param topCenterIcon 内置的顶部中心点的Icon | |
* @param topRightIcon 内置的顶部右侧Icon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.draw.drawBehind | |
import androidx.compose.ui.graphics.Color | |
import androidx.compose.ui.graphics.Paint | |
import androidx.compose.ui.graphics.drawscope.drawIntoCanvas | |
import androidx.compose.ui.graphics.toArgb | |
import androidx.compose.ui.unit.Dp | |
import androidx.compose.ui.unit.dp |