500px / 500px-android-blur

Android Blurring View
http://developers.500px.com/2015/03/17/a-blurring-view-for-android.html
MIT License
2.7k stars 325 forks source link

Sometimes the I dont see blur #12

Open sayoojvalsan opened 9 years ago

sayoojvalsan commented 9 years ago

I am using blur view in a fragment.

For example in the fragment layout,

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" .... tools:context="fragments.FeedFragment">

<android.support.v4.widget.SwipeRefreshLayout
 ...>

    <com.github.yasevich.endlessrecyclerview.EndlessRecyclerView
        android:id="@+id/feedList"
  ..../>

</android.support.v4.widget.SwipeRefreshLayout>

<FrameLayout android:id="@+id/emptyState"
      .../>

</FrameLayout>

<!-- Here, we customize the blurring view with values different from the defaults. -->
<com.fivehundredpx.android.blur.BlurringView
    android:id="@+id/blurring_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:blurRadius="11"
    app:downsampleFactor="7"
    app:overlayColor="#99FFFFFF"/>

And in the Fragment,

I do in the onActivityCreated, I use

        mBlurringView.setBlurredView(getView().findViewById(R.id.feedList));

I also call this in the onResume just to make sure, its setting the view.

But the issue is that sometimes I see the blur, sometimes, I dont see anything ? Am I missing anything ? Ofcourse I am also calling mBlurringView.invalidate();

I am using the fragment in a view pager

ka05 commented 7 years ago

I am also using a ViewPager and im not seeing the blur. When i use the view of the fragment that is currently visible as the blurredView it will blur but it is offset since i'm using a Tabbar.