byoxcode / drawview Goto Github PK
View Code? Open in Web Editor NEWAndroid view that allows the user to create drawings. Customize settings like color, width or tools. Undo or redo actions. Zoom into DrawView and add a background.
Android view that allows the user to create drawings. Customize settings like color, width or tools. Undo or redo actions. Zoom into DrawView and add a background.
Hello!
It's such a nice library you made it there!
But there is one problem, i added the background using your function on wiki and i already settings memory use of the image with inSampleSize but it's still so laggy to drawing, any solution can you offer? Thanks in advance!
is there a method that tells if the canvas is blank or empty? Necessary to know if the view has been edited for auto save features or clearing of previous answers, so it could just be a boolean that's set once the canvas is drawn on or if the history is empty.
Bitmap init = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);
mZoomOverlay = init.copy(Bitmap.Config.ARGB_8888, true);
init.recycle();
mCanvasOverlay = new Canvas(mZoomOverlay);
invalidate();
Android Version 10
compileSdkVersion 28
minSdkVersion 14
targetSdkVersion 28
versionCode 14
versionName "1.3.1"
when i use drawview setBackgroundImage() method,
this is code:
and it can show background Image Successfully,But When I start to other activity,drawview crashed:
java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.byox.drawview.dictionaries.DrawMove) at android.os.Parcel.writeSerializable(Parcel.java:1505) at android.os.Parcel.writeValue(Parcel.java:1453) at android.os.Parcel.writeArrayMapInternal(Parcel.java:702) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1412) at android.os.Bundle.writeToParcel(Bundle.java:1133) at android.os.Parcel.writeBundle(Parcel.java:742) at android.os.Parcel.writeValue(Parcel.java:1371) at android.os.Parcel.writeSparseArray(Parcel.java:830) at android.os.Parcel.writeValue(Parcel.java:1405) at android.os.Parcel.writeArrayMapInternal(Parcel.java:702) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1412) at android.os.Bundle.writeToParcel(Bundle.java:1133) at android.os.Parcel.writeBundle(Parcel.java:742) at android.support.v4.app.FragmentState.writeToParcel(Fragment.java:156) at android.os.Parcel.writeTypedArray(Parcel.java:1285) at android.support.v4.app.FragmentManagerState.writeToParcel(FragmentManager.java:617) at android.os.Parcel.writeParcelable(Parcel.java:1474) at android.os.Parcel.writeValue(Parcel.java:1380) at android.os.Parcel.writeArrayMapInternal(Parcel.java:702) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1412) at android.os.Bundle.writeToParcel(Bundle.java:1133) at android.os.Parcel.writeBundle(Parcel.java:742) at android.support.v4.app.FragmentState.writeToParcel(Fragment.java:156) at android.os.Parcel.writeTypedArray(Parcel.java:1285) at android.support.v4.app.FragmentManagerState.writeToParcel(FragmentManager.java:617) at android.os.Parcel.writeParcelable(Parcel.java:1474) at android.os.Parcel.writeValue(Parcel.java:1380) at android.os.Parcel.writeArrayMapInternal(Parcel.java:702) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1412) at android.os.Bundle.writeToParcel(Bundle.java:1133) at android.os.Parcel.writeBundle(Parcel.java:742) at android.support.v4.app.FragmentState.writeToParcel(Fragment.java:156) at android.os.Parcel.writeTypedArray(Parcel.java:1285) at android.support.v4.app.FragmentManagerState.writeToParcel(FragmentManager.java:617) at android.os.Parcel.writeParcelable(Parcel.java:1474) at android.os.Parcel.writeValue(Parcel.java:1380) at android.os.Parcel.writeArrayMapInternal(Parcel.java:702) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1412) at android.os.Bundle.writeToParcel(Bundle.java:1133) at android.os.Parcel.writeBundle(Parcel.java:742) at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:3629) at android.app.ActivityThread$StopInfo.run(ActivityThread.java:4028) at android.os.Handler.handleCallback(Handler.java:761) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6577) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832) Caused by: java.io.NotSerializableException: android.graphics.Matrix at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1224) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1584) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1549) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1472) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1218) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346) at android.os.Parcel.writeSerializable(Parcel.java:1500) at android.os.Parcel.writeValue(Parcel.java:1453) at android.os.Parcel.writeArrayMapInternal(Parcel.java:702) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1412) at android.os.Bundle.writeToParcel(Bundle.java:1133) at android.os.Parcel.writeBundle(Parcel.java:742) at android.os.Parcel.writeValue(Parcel.java:1371) at android.os.Parcel.writeSparseArray(Parcel.java:830) at android.os.Parcel.writeValue(Parcel.java:1405) at android.os.Parcel.writeArrayMapInternal(Parcel.java:702) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1412) at android.os.Bundle.writeToParcel(Bundle.java:1133) at android.os.Parcel.writeBundle(Parcel.java:742) at android.support.v4.app.FragmentState.writeToParcel(Fragment.java:156) at android.os.Parcel.writeTypedArray(Parcel.java:1285) at android.support.v4.app.FragmentManagerState.writeToParcel(FragmentManager.java:617) at android.os.Parcel.writeParcelable(Parcel.java:1474) at android.os.Parcel.writeValue(Parcel.java:1380) at android.os.Parcel.writeArrayMapInternal(Parcel.java:702) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1412) at android.os.Bundle.writeToParcel(Bundle.java:1133) at android.os.Parcel.writeBundle(Parcel.java:742) at android.support.v4.app.FragmentState.writeToParcel(Fragment.java:156) at android.os.Parcel.writeTypedArray(Parcel.java:1285) at android.support.v4.app.FragmentManagerState.writeToParcel(FragmentManager.java:617) at android.os.Parcel.writeParcelable(Parcel.java:1474) at android.os.Parcel.writeValue(Parcel.java:1380) at android.os.Parcel.writeArrayMapInternal(Parcel.java:702) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1412) at android.os.Bundle.writeToParcel(Bundle.java:1133) at android.os.Parcel.writeBundle(Parcel.java:742) at android.support.v4.app.FragmentState.writeToParcel(Fragment.java:156) at android.os.Parcel.writeTypedArray(Parcel.java:1285) at android.support.v4.app.FragmentManagerState.writeToParcel(FragmentManager.java:617) at android.os.Parcel.writeParcelable(Parcel.java:1474) at android.os.Parcel.writeValue(Parcel.java:1380) at android.os.Parcel.writeArrayMapInternal(Parcel.java:702) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1412) at android.os.Bundle.writeToParcel(Bundle.java:1133) at android.os.Parcel.writeBundle(Parcel.java:742) at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:3629) at android.app.ActivityThread$StopInfo.run(ActivityThread.java:4028) at android.os.Handler.handleCallback(Handler.java:761) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6577) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
I want to make drawview over image. Can you please help .
Thankyou
I am getting this error when i press undo or redo button multiple times quickly
java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.byox.drawview.views.DrawView.onDraw(DrawView.java:202)
at android.view.View.draw(View.java:16199)
at android.view.View.updateDisplayListIfDirty(View.java:15196)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:281)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:287)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:322)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2627)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2446)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2079)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1119)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6060)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
at android.view.Choreographer.doFrame(Choreographer.java:606)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
I have some questions about the functionality where a bitmap is added as a background.
Does the bitmap scale to try and fill the whole screen if the aspect ratio of that bitmap allows ?
Is the bitmap also added to the undo / redo states so that it can be removed if necessary ?
Anybody else having issue with the zoom functionality? It doesn't zoom to near edges of the draw view.
I'd really appreciate it if anyone would share if they solved this issue,
There is no description of the version number like other android libraries in read me. Everywhere it is mentioned as X.X.X?
How to calculate the percentage of the graffiti on the screen
Hello @ByoxCode
How to make Arrow Head Fill like this.
https://drive.google.com/file/d/1t1P7_wq53umGOxDT-ho-pPK6iHslHqhh/view?usp=sharing
Hi,
Thanks for your great library. It's awsome.
However i have an isssue that is when i change to eraser mode, it also clears background image.
How can i prevent this?
Thanks.
There are many draw tools, but arrow. If you can add it, that's so great.
I have been testing this library and on some devices I have realized that a lag takes place and the lines end up looking choppy etc. After doing some research I realized that it's a thing with the canvas api and that several things have to be done to make it smoother. Two of them are :
This is mainly important when drawing using the pen tool.
Thank you for such an awesome library! Its helping me. However, an error occured while using it and I'd like to know if you can help me. Thanks!
java.lang.IllegalArgumentException: width and height must be > 0
Crashes on line drawingView.setBackgroundImage(editingImage, BackgroundType.FILE, BackgroundScale.CENTER_INSIDE);
If removed, no error occurs.
My XML:
<com.byox.drawview.views.DrawView
android:id="@+id/drawingView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:dv_draw_corners="round"
app:dv_draw_tool="pen"
app:dv_draw_enable_zoom="true"
app:dv_draw_max_zoom_factor="15"
app:dv_draw_alpha="255"
app:dv_draw_width="10"/>
configuration code:
drawingView = (DrawView) findViewById(R.id.drawingView);
drawingView.setBackgroundImage(editingImage, BackgroundType.FILE, BackgroundScale.CENTER_CROP);
drawingView.setDrawColor(getResources().getColor(R.color.colorPickerDefault))
.setZoomEnabled(true)
.setMaxZoomFactor(15)
.setDrawAlpha(255)
.setDrawWidth(maxPenSize);
drawingView.setBackgroundImage(editingImage, BackgroundType.FILE, BackgroundScale.CENTER_INSIDE);
What am I doing wrong?
How to add a white board background? Default the background is transparent.
bitmap should be > 0 msg
We could also add an option to zoom in and out
I downloaded the example app from the play store and it's not allowing me to add a background, screen just goes white.
This is a great library ,I would like to ask ,If the background color is set for the view and the background image is set, then the eraser is set to remove the background mode. At this time, the eraser effect is a little bit wrong, and the background color is displayed on the top
hi
i want to programmatically change the drawview after SetBackgroundImage(), because i have to apply drawview to the same size as background image. but It's not as good as I thought... how can i solve it ?
Hi,
The view crashes after setting a bitmap (as background image) loaded via Glide.
Load the image
Glide.with(this)
.asBitmap()
.load(Uri.parse(args.getImageUri()))
.into(new DrawViewTarget(binding.drawView));
Set as background
private static class DrawViewTarget extends CustomViewTarget<DrawView, Bitmap> {
public DrawViewTarget(@NonNull DrawView view) {
super(view);
}
@Override
protected void onResourceCleared(@Nullable Drawable placeholder) {
}
@Override
public void onLoadFailed(@Nullable Drawable errorDrawable) {
}
@Override
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
getView().setBackgroundImage(resource, BackgroundType.BITMAP, BackgroundScale.CENTER_INSIDE);
}
}
Exit the activity
java.lang.IllegalStateException: Cannot obtain size for recycled Bitmap: android.graphics.Bitmap@65c2b97[1440x2560] ARGB_8888
at com.bumptech.glide.util.Util.getBitmapByteSize(Util.java:81)
at com.bumptech.glide.load.resource.bitmap.BitmapResource.getSize(BitmapResource.java:52)
at com.bumptech.glide.load.engine.EngineResource.getSize(EngineResource.java:62)
at com.bumptech.glide.load.engine.cache.LruResourceCache.getSize(LruResourceCache.java:40)
at com.bumptech.glide.load.engine.cache.LruResourceCache.getSize(LruResourceCache.java:11)
at com.bumptech.glide.util.LruCache.put(LruCache.java:131)
at com.bumptech.glide.load.engine.cache.LruResourceCache.put(LruResourceCache.java:11)
at com.bumptech.glide.load.engine.Engine.onResourceReleased(Engine.java:397)
at com.bumptech.glide.load.engine.EngineResource.release(EngineResource.java:116)
at com.bumptech.glide.load.engine.Engine.release(Engine.java:363)
at com.bumptech.glide.request.SingleRequest.clear(SingleRequest.java:328)
at com.bumptech.glide.manager.RequestTracker.clearAndRemove(RequestTracker.java:72)
at com.bumptech.glide.RequestManager.untrack(RequestManager.java:660)
at com.bumptech.glide.RequestManager.untrackOrDelegate(RequestManager.java:628)
at com.bumptech.glide.RequestManager.clear(RequestManager.java:624)
at com.bumptech.glide.RequestManager.onDestroy(RequestManager.java:371)
at com.bumptech.glide.manager.ActivityFragmentLifecycle.onDestroy(ActivityFragmentLifecycle.java:65)
at com.bumptech.glide.manager.SupportRequestManagerFragment.onDestroy(SupportRequestManagerFragment.java:215)
at androidx.fragment.app.Fragment.performDestroy(Fragment.java:3206)
at androidx.fragment.app.FragmentStateManager.destroy(FragmentStateManager.java:771)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:350)
at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:112)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1636)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3112)
at androidx.fragment.app.FragmentManager.dispatchDestroy(FragmentManager.java:3091)
at androidx.fragment.app.Fragment.performDestroy(Fragment.java:3201)
at androidx.fragment.app.FragmentStateManager.destroy(FragmentStateManager.java:771)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:350)
at androidx.fragment.app.SpecialEffectsController$FragmentStateManagerOperation.complete(SpecialEffectsController.java:742)
at androidx.fragment.app.SpecialEffectsController$Operation.completeSpecialEffect(SpecialEffectsController.java:669)
at androidx.fragment.app.DefaultSpecialEffectsController$SpecialEffectsInfo.completeSpecialEffect(DefaultSpecialEffectsController.java:755)
at androidx.fragment.app.DefaultSpecialEffectsController$9.run(DefaultSpecialEffectsController.java:631)
at androidx.transition.FragmentTransitionSupport$5.onTransitionEnd(FragmentTransitionSupport.java:280)
at androidx.transition.Transition.end(Transition.java:1965)
at androidx.transition.TransitionSet$TransitionSetListener.onTransitionEnd(TransitionSet.java:451)
at androidx.transition.Transition.end(Transition.java:1965)
at androidx.transition.Transition$3.onAnimationEnd(Transition.java:1914)
at android.animation.Animator$AnimatorListener.onAnimationEnd(Animator.java:554)
at android.animation.AnimatorSet.endAnimation(AnimatorSet.java:1301)
at android.animation.AnimatorSet.doAnimationFrame(AnimatorSet.java:1086)
at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
at android.animation.AnimationHandler.access$100(AnimationHandler.java:37)
at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:970)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
2021-02-25 23:07:51.952 17067-17067/a.b.c E/AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:727)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7478)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
when i am added draview to the size of my image view it shows for placeholder size.
Drawing is PIxeled, whenever you make a turning, the curve isn't smooth
Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=12; index=-1 at java.util.ArrayList.get(ArrayList.java:310) at com.byox.drawview.views.DrawView.onTouch(DrawView.java:204) at android.view.View.dispatchTouchEvent(View.java:9296)
Its easy to reproduce this issue. While you are drawing before MotionEvent.ACTION_UP
call method restartDrawing
this will clear mDrawMoveHistory array and cause a crash.
Possible solution is to implement some kind of state machine which will ignore move event after restartDrawing
or ignore restart method while drawing or just simply check
mDrawMoveHistoryIndex != -1
in MotionEvent.ACTION_UP
and MotionEvent.ACTION_MOVE
cases.
Great application. But want to draw different shapes like Triangle, Pentagon, Hexagon etc. How to draw such shapes with the help of DrawView.
Hello i have add this class on my app but the drawing camera not showing i can draw but camera in background not showing ( show just black screen but i can drow on it )
First: Great Library ;-)
Is it already possible to load a previously drawn image?
best regards,
Moritz
java.lang.NullPointerException: Attempt to invoke virtual method 'float com.byox.drawview.utils.SerializablePaint.getStrokeWidth()' on a null object reference
at com.byox.drawview.views.DrawView.onTouch(SourceFile:404)
at android.view.View.dispatchTouchEvent(View.java:9316)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2559)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2252)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2565)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2266)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2565)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2266)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2565)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2266)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2565)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2266)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2565)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2266)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2565)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2266)
at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2736)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1781)
at android.app.Activity.dispatchTouchEvent(Activity.java:2906)
at com.dante.diary.base.BaseActivity.dispatchTouchEvent(SourceFile:132)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(SourceFile:71)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(SourceFile:71)
at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2691)
at android.view.View.dispatchPointerEvent(View.java:9542)
at android.view.ViewRootImpl$SmartisanosTouchFilter.filterForEdgeTouch(ViewRootImpl.java:8085)
at android.view.ViewRootImpl$SmartisanosTouchFilter.access$1800(ViewRootImpl.java:7991)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4620)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4482)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3958)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4011)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3977)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4103)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3985)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4160)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3958)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4011)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3977)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3985)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3958)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6503)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6444)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6405)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6696)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:323)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5547)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:935)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:726)
Just have log from user
I changed DrawView size(width) after some process, but it's not changed.
How can I change the width of DrawView dynamically?
or is there any way to create DrawView programmatically?
I tried your code no error with same implementations, but when I tested on larger device it lags.
Any help or idea from you? thank you very much...
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.