mmin18/RealtimeBlurView

Usage on Jetpack Compose

ComposeDesigner opened this issue · 2 comments

There isn't a straightforward way to use this on Jetpack Compose yet. Could it be possible to provide a Composable component that can use the RealTimeBlurView library? Thank you!

kotlin```
AndroidView(
modifier = Modifier
.width(250.sdp())
.height(800.sdp())
.clip(RoundedCornerShape(20.sdp())),
factory = { context ->
val inflate =
LayoutInflater.from(context).inflate(R.layout.realtime_blur_view, null, false)
.apply {
val viewRealtime = findViewById(R.id.view_realtime)
viewRealtime.setBlurRadius(50f)
}
inflate
})

kotlin```
AndroidView(
modifier = Modifier
.width(250.sdp())
.height(800.sdp())
.clip(RoundedCornerShape(20.sdp())),
factory = { context ->
val inflate =
LayoutInflater.from(context).inflate(R.layout.realtime_blur_view, null, false)
.apply {
val viewRealtime = findViewById(R.id.view_realtime)
viewRealtime.setBlurRadius(50f)
}
inflate
})