Blurry
Blurry copied to clipboard
starting work only after second call
Call
Blurry.with(getActivity())
.radius(5)
.sampling(2)
.color(Color.argb(66, 0, 0, 0))
.async()
.animate(500)
.onto(linearLayout);
in fragment, on click. Blurring happens only after second click. CatLog says:
V/RenderScript: 0x780f4d68 Launching thread(s), CPUs 4
E/RenderScript: Successfully loaded runtime: libRSDriver_adreno.so
on each click. but nothing happens at first click. Why is it so? OS: kitkat 4.4.4
Im getting the same in Kotlin. Inside a RecyclerView. For it to start rendering I need to add another element to the adapter (this means: I add A and blur it (Nothing happens) I add B -> A blurs. )
Code using is:
fun setBlur(blur: Boolean) {
if (blur) {
Blurry.with(context).radius(20)
.animate(800)
.async()
.onto(this);
} else Blurry.delete(this)
active = !blur
}
Full code is here: https://github.com/saantiaguilera/android-kotlin-test-stuff/blob/657daa338e36c9f43f631cebd739d22659a8ffa7/app/src/main/java/com/example/santiago/kotlintests/queue_list/recycler/view/TaskView.kt