Closed OrhanTozan closed 2 years ago
Please show examples, code, layout and screenshots. I can't guess based on 1 sentence
@Dimezis
this is the XML
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="64dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:fontFamily="@font/helveticaneue_bold"
android:text="@{weekLabel.text}"
android:textColor="#6F6F6F"
android:textSize="14sp"
tools:text="Week 17, 20-27 april" />
<eightbitlab.com.blurview.BlurView
android:id="@+id/blurView"
android:layout_width="match_parent"
android:layout_height="match_parent">
</eightbitlab.com.blurview.BlurView>
</FrameLayout>
and
binding.blurView.setupWith(parent)
.setBlurAlgorithm(RenderScriptBlur(parent.context))
.setBlurRadius(25f)
.setBlurAutoUpdate(true)
What's the parent? If it doesn't have a background, the blurred TextView gets blended with a transparent background resulting in a low alpha.
Check on a smaller blur radius or much bigger TextView. If it's indeed the problem, use setFrameClearDrawable as the example project suggests
@Dimezis I just changed it, and passed the framelayout to the setupWith() parameter. Still the same result.
Do you mean the parent of the framelayout? I think it is the Recyclerview viewholder viewgroup that is the parent
I mean what's the parent
var here in your code binding.blurView.setupWith(parent)
?
Can you send the screenshot with and without the BlurView?
Did you try setFrameClearDrawable
?
@Dimezis I fixed it by changing the framelayouts height from wrap_content to a 75dp. Do you perhaps know why wrap_content isn't supported?
Because BlurView is a FrameLayout.
And FrameLayout with a match_parent
size inside of another FrameLayout
parent with wrap_content
size resolves itself to a 0 size.
Ok, would not expect that. Would expect it to keep its height to match the parent, as the name says.
It's tricky, yes. But not a BlurView issue, so I'm closing it
I have a framelayout with a textview and a blurview above. The textview doesn't get blurred.