500px / 500px-android-blur Goto Github PK
View Code? Open in Web Editor NEWAndroid Blurring View
Home Page: http://developers.500px.com/2015/03/17/a-blurring-view-for-android.html
License: MIT License
Android Blurring View
Home Page: http://developers.500px.com/2015/03/17/a-blurring-view-for-android.html
License: MIT License
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
java.lang.StackOverflowError: stack size 8MB
at android.graphics.Bitmap.eraseColor(Bitmap.java:1660)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.java:64)
at android.view.View.draw(View.java:17476)
at android.view.View.draw(View.java:17388)
at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
at android.view.View.draw(View.java:17479)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.java:67)
at android.view.View.draw(View.java:17476)
at android.view.View.draw(View.java:17388)
at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
at android.view.View.draw(View.java:17479)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.java:67)
at android.view.View.draw(View.java:17476)
at android.view.View.draw(View.java:17388)
at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
at android.view.View.draw(View.java:17479)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.java:67)
at android.view.View.draw(View.java:17476)
at android.view.View.draw(View.java:17388)
at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
at android.view.View.draw(View.java:17479)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.java:67)
at android.view.View.draw(View.java:17476)
at android.view.View.draw(View.java:17388)
at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
at android.view.View.draw(View.java:17479)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.java:67)
at android.view.View.draw(View.java:17476)
at android.view.View.draw(View.java:17388)
at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
at android.view.View.draw(View.java:17479)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.java:67)
at android.view.View.draw(View.java:17476)
at android.view.View.draw(View.java:17388)
at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
at android.view.View.draw(View.java:17479)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.java:67)
at android.view.View.draw(View.java:17476)
at android.view.View.draw(View.java:17388)
at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
at android.view.View.draw(View.java:17479)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.java:67)
at android.view.View.draw(View.java:17476)
at android.view.View.draw(View.java:17388)
at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
at android.view.View.draw(View.java:17479)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.java:67)
at android.view.View.draw(View.java:17476)
at android.view.View.draw(View.java:17388)
at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
at android.view.View.draw(View.java:17479)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.java:67)
at android.view.View.draw(View.java:17476)
at android.view.View.draw(View.java:17388)
at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
at android.view.View.draw(View.java:17479)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.java:67)
at android.view.View.draw(View.java:17476)
at android.view.View.draw(View.java:17388)
at android.view.ViewGroup.drawChild(ViewGroup.java:3921)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711)
at android.view.View.draw(View.java:17479)
at com.wm.motor.ui.widget.BlurringView.onDraw(BlurringView.ja
This doesn't work on lollipop,
just gradient transparent to white , from left to right
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.user.designsample, PID: 19998
java.lang.StackOverflowError: stack size 8MB
at android.graphics.Canvas.drawOval(Canvas.java:1155)
at android.graphics.Canvas.drawOval(Canvas.java:1147)
at android.graphics.drawable.GradientDrawable.draw(GradientDrawable.java:615)
at android.view.View.drawBackground(View.java:16376)
at android.view.View.draw(View.java:16175)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundredpx.android.blur.BlurringView.onDraw(BlurringView.java:65)
at android.view.View.draw(View.java:16184)
at com.fivehundred
05-05 23:16:31.323 19998-19998/com.example.user.humandesignsample E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 6333780)
05-05 23:16:31.361 19998-19998/com.example.user.humandesignsample E/AndroidRuntime: Error reporting crash
android.os.TransactionTooLargeException: data parcel size 6333780 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:503)
at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:4425)
at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:90)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
I really really want to thank you for this. This is exactly what I needed however I can't seem to animate alpha from 0 to 1.
This code can fit directly into your sample to show you the problem.
public void shuffle(View view) {
final AlphaAnimation animation1 = new AlphaAnimation(0.1f, 1.0f);
animation1.setDuration(1000);
animation1.setStartOffset(1000);
animation1.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationEnd(Animation arg0) {
blurrHolder.invalidate();
blurrHolder.setAlpha((float) 1);
}
@Override
public void onAnimationRepeat(Animation arg0) {
blurrHolder.invalidate();
}
@Override
public void onAnimationStart(Animation arg0) {
blurrHolder.invalidate();
}
});
mBlurringView.startAnimation(animation1);
}
is it because render script was deprecated?
crash at the opening of the application
my layout :
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFFFF">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false">
<RelativeLayout
android:background="#FF02ADEA"
android:id="@+id/blurred_view"
android:layout_width="600dp"
android:layout_height="600dp"
android:layout_gravity="center"
android:clipChildren="false">
</RelativeLayout>
</FrameLayout>
<com.fivehundredpx.android.blur.BlurringView
android:id="@+id/blurring_view"
android:layout_width="360dp"
android:layout_height="360dp"
android:layout_gravity="center"
app:blurRadius="11"
app:downsampleFactor="6"
app:overlayColor="#99FFFFFF"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_launcher"/>
</FrameLayout>
my java :
import android.os.*;
import android.app.*;
import com.fivehundredpx.android.blur.BlurringView;
import android.support.v7.app.AppCompatActivity;
import android.graphics.Color;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.FrameLayout;
public class ActivityIconThemeCyano extends AppCompatActivity
{
private BlurringView blV;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.icon_themecyano);
makeAppFullscreen();
blV = (BlurringView)findViewById(R.id.blurring_view);
View imgV = findViewById(R.id.blurred_view);
blV.setBlurredView(imgV);
}
private void makeAppFullscreen()
{
getWindow().setStatusBarColor(Color.TRANSPARENT);
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
}
}
did I do something wrong ? My API is 21-23
When I use proguard with minifyEnabled option I get this fatal crash on launch:
java.lang.RuntimeException: Unable to start activity ComponentInfo{...}: android.view.InflateException: Binary XML file line #67: Error inflating class com.fivehundredpx.android.blur.BlurringView
But with minifyEnabled turned off, it works fine.
Are there any proguard rules I need to add?
I want use on a MediaPlayer,but it is a Surface.
and i can't linsten the frame changed.
Hello i'm using this package but it seems that in jcenter, your package was deleted... could you please re upload?
thanks
https://jcenter.bintray.com/com/fivehundredpx/blurringview/1.0.0/blurringview-1.0.0.jar
https://jcenter.bintray.com/com/fivehundredpx/blurringview/1.0.0/blurringview-1.0.0.pom
I tried this library and it's looking promising, but it doesn't work with ArcGIS maps, which I would like to blur. Could you have a look and/or give advise? I have modified your example to ilustrate problem.
Stackoverflow question: http://stackoverflow.com/questions/37067506/blurring-arcgis-map-view
My example: https://github.com/wedkarz/500px-android-blur/tree/arcgis_blur_maps
Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.fivehundredpx.android.blur.BlurringView
at android.view.LayoutInflater.createView(LayoutInflater.java:623)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:400)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.view.View.inflate(View.java:17504)
at com.fivetv.elementary.view.pager.ProvideCluePager.initView(ProvideCluePager.java:26)
at com.fivetv.elementary.view.pager.BasePager.<init>(BasePager.java:31)
at com.fivetv.elementary.view.pager.ProvideCluePager.<init>(ProvideCluePager.java:21)
at com.fivetv.elementary.activity.MediaPlayerActivity.initView(MediaPlayerActivity.java:134)
at com.fivetv.elementary.activity.MediaPlayerActivity.onCreate(MediaPlayerActivity.java:67)
at android.app.Activity.performCreate(Activity.java:5249)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2165)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
at android.app.ActivityThread.access$800(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5065)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:597)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:400)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.view.View.inflate(View.java:17504)
at com.fivetv.elementary.view.pager.ProvideCluePager.initView(ProvideCluePager.java:26)
at com.fivetv.elementary.view.pager.BasePager.<init>(BasePager.java:31)
at com.fivetv.elementary.view.pager.ProvideCluePager.<init>(ProvideCluePager.java:21)
at com.fivetv.elementary.activity.MediaPlayerActivity.initView(MediaPlayerActivity.java:134)
at com.fivetv.elementary.activity.MediaPlayerActivity.onCreate(MediaPlayerActivity.java:67)
at android.app.Activity.performCreate(Activity.java:5249)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2165)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
at android.app.ActivityThread.access$800(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5065)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: android.support.v8.renderscript.RenderScript
at com.fivehundredpx.android.blur.BlurringView.initializeRenderScript(BlurringView.java:98)
at com.fivehundredpx.android.blur.BlurringView.<init>(BlurringView.java:37)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:597)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:400)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.view.View.inflate(View.java:17504)
at com.fivetv.elementary.view.pager.ProvideCluePager.initView(ProvideCluePager.java:26)
at com.fivetv.elementary.view.pager.BasePager.<init>(BasePager.java:31)
at com.fivetv.elementary.view.pager.ProvideCluePager.<init>(ProvideCluePager.java:21)
at com.fivetv.elementary.activity.MediaPlayerActivity.initView(MediaPlayerActivity.java:134)
at com.fivetv.elementary.activity.MediaPlayerActivity.onCreate(MediaPlayerActivity.java:67)
at android.app.Activity.performCreate(Activity.java:5249)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2165)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
at android.app.ActivityThread.access$800(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5065)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
I have already add the
"renderscriptTargetApi 20"
"renderscriptSupportModeEnabled true"
in my gradle file . but i still got that error ,why?
I put:
dependencies {
compile 'com.fivehundredpx:blurringview:1.0.0'
}
in the gradle file but it says "Failed to resolve: com.fivehundredpx:blurringview:1.0.0
"
Am I doing something wrong?
why?
App crashed in some cellphones with the api below level 19.
android.support.v8.renderscript.RSRuntimeException:Error loading RS jni library: java.lang.UnsatisfiedLinkError: unknown failure
android.support.v8.renderscript.RenderScript.a(Unknown Source)
android.support.v8.renderscript.RenderScript.a(Unknown Source)
android.support.v8.renderscript.RenderScript.a(Unknown Source)
XYBlurringView.void initializeRenderScript(android.content.Context)(Unknown Source)
rt
If I use BlurringView
and then go to another activity, and them come back to the previous activity. The Blurred image disappears.
Is it possible to make the BlurringView blur everything that's beneath it? (Not only its sibling views.)
-R
I've been spending some time fixing up the react-native-blur library, which is not great on Android. The docs need some updates, but right now their suggested usage works on iOS, and can cause an infinite loop on Android.
I think it might be a good idea to add a check in BlurringView
, to make sure that there are no circular references that would cause an infinite loop (where the BlurringView
is trying to to draw itself).
Not just for React Native developers, but for any other Android developers who might do this by accident, and wonder why their app is just freezing before crashing from a stack overflow.
I don't have a ton of experience with Android, but I can try to submit a PR if you think this is a reasonable idea.
Use isInEditMode() condition in your customs view for properly browsing in Android Studio Layout editor
First, thanks for this great library!
I'm using your BlurringView to blur a full screen image in my app, but I'm getting artifacts at the edge of the screen where the image isn't blurred. I read in your blog post that you added the lines:
scaledWidth = scaledWidth - (scaledWidth % 4) + 4;
scaledHeight = scaledHeight - (scaledHeight % 4) + 4;
to remove artifacts at the edges of the view, but for me, removing those two lines removed the artifacts. Is it safe to remove those lines? Do the artifacts depend on the image, the device, the downsample factor, or the blurring radius?
Hello,
I was trying to use your blur view in my app insde items displyed in RecyclerView. Unfortunatly, after my recycler is scrolled (up or down) for few items I get following exception:
android.support.v8.renderscript.RSInvalidStateException: Calling RS with no Context active.
at android.support.v8.renderscript.ExceptionThunker.convertException(ExceptionThunker.java:26)
at android.support.v8.renderscript.AllocationThunker.copyFrom(AllocationThunker.java:183)
It is thrown from blur method. To me it looks like this is caused by items being recycled and reused by RecycleView. For current moment I haven't found any solution for this.
click shuffle
add 0.01Memory leck
show memory monitor
Was Renderscript Support mode tried? it's v8 and easy to enable in the build script
defaultConfig{
..
renderscriptTargetApi 21
renderscriptSupportModeEnabled true
..
}
http://developer.android.com/tools/support-library/features.html#v8
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.