Closed Fox2Code closed 1 year ago
By doing testes, I found out scaleFactor
was the reason why #186 was happening.
Adding the fix to this PR as there is no other way to implement it than to add a setupWith
parameter, and I don't want to push conflicting PRs.
Thanks for trying to help, but this PR is a no-go for me, sorry!
I don't agree with the setupWith
change, and the scaleFactor
can already be changed if you want to (but it's better to mitigate the scaling issue with just a bigger blur radius, as I mentioned in the corresponding issue)
Or overriding scaleFactor
on the BlurAlgorithm
works too, I thinks it's better like that, I'll revert the last commit.
I reverted the commit, if you are still not ok with only theses changes, feel free to close this PR.
Hey people, especially @Fox2Code and @Dimezis
Why not just have 2 versions of the method?
In this case, we could extract all logic into chooseDefaultAlgorithm()
method where there would be all API version checks.
And on the other hand we have a power to give users create their own BlurAlgorithm
public class BlurView extends FrameLayout {
public BlurViewFacade setupWith(@NonNull ViewGroup rootView) {
final BlurAlgorithm algorithm = chooseDefaultAlgorithm();
setupWith(rootView, algorithm)
}
public BlurViewFacade setupWith(@NonNull ViewGroup rootView, BlurAlgorithm algorithm) {
...
}
}
I added a convenience setupWith
method in 2.0.3
I recently upgraded from
1.6.6
to2.0.2
and I noticed setupWith method signature changed.Bring back the old setupWith by choosing best available algorithm with of few thing I would like as a developer.
Also only using one instance of
NoOpController
instead of making one for eachBlurView
.