Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage on Jetpack Compose #58

Open
ComposeDesigner opened this issue Jan 27, 2022 · 2 comments
Open

Usage on Jetpack Compose #58

ComposeDesigner opened this issue Jan 27, 2022 · 2 comments

Comments

@ComposeDesigner
Copy link

ComposeDesigner commented Jan 27, 2022

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!

@pengzhenkun
Copy link

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
})

1 similar comment
@pengzhenkun
Copy link

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
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants