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.

Related tags

UI/UX DrawView
Overview

DrawView

drawview

DrawView DrawViewSnapshot Platform Language

Android view that allows the user to create drawings. Draw anything you like in your Android device from simple view.

Customize draw settings like draw color, draw width or draw tools.

Undo or redo actions it is possible with DrawView.

undo redo gif text tool gif save bitmap gif zoom gif camera gif

View example APK

Usage

With Gradle:

  implementation 'com.byox.drawview:drawview:X.X.X'

or Maven:

<dependency>
  <groupId>com.byox.drawview</groupId>
  <artifactId>drawview</artifactId>
  <version>X.X.X</version>
  <type>pom</type>
</dependency>

Where X.X.X is the current version of DrawView

Snapshot

Import from:

  maven { url "https://raw.githubusercontent.com/ByoxCode/DrawView/snapshot/aar/snapshots/" }

With Gradle:

  implementation 'com.byox.drawview:drawview:X.X.X-SNAPSHOT'

or Maven:

<dependency>
  <groupId>com.byox.drawview</groupId>
  <artifactId>drawview</artifactId>
  <version>X.X.X-SNAPSHOT</version>
  <type>pom</type>
</dependency>

Where X.X.X is the current version of DrawView Snapshot

How to use

Add DrawView to your layout

  <com.byox.drawview.views.DrawView
        android:id="@+id/draw_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:dv_draw_alpha="255"
        app:dv_draw_anti_alias="true"
        app:dv_draw_color="@color/colorAccent"
        app:dv_draw_corners="round"
        app:dv_draw_dither="true"
        app:dv_draw_enable_zoom="true"
        app:dv_draw_font_family="default_font"
        app:dv_draw_font_size="12"
        app:dv_draw_max_zoom_factor="8"
        app:dv_draw_mode="draw"
        app:dv_draw_style="stroke"
        app:dv_draw_tool="pen"
        app:dv_draw_width="4"
        app:dv_draw_zoomregion_maxscale="5"
        app:dv_draw_zoomregion_minscale="2"
        app:dv_draw_zoomregion_scale="4" />

Attributes

Please visit Wiki

Donate

If this library is useful for you, and you like it, and if want to contribute for develop more libraries, you can buy me a beer. PayPal

Apps that uses DrawView

Please feel free to contact me if you like to appear in this section.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Comments
  • Bitmap background.

    Bitmap background.

    I have some questions about the functionality where a bitmap is added as a background.

    1. Does the bitmap scale to try and fill the whole screen if the aspect ratio of that bitmap allows ?

    2. Is the bitmap also added to the undo / redo states so that it can be removed if necessary ?

    opened by jd-alexander 10
  • DrawView Crash

    DrawView Crash

    when i use drawview setBackgroundImage() method, this is code: qq 20171109221817

    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) 

    fixed 
    opened by yaochangliang159 9
  • Performance Issues

    Performance Issues

    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 :

    1. not invalidating the entire screen but only replacing the area that was updated, possibly using a clipRect

    This is mainly important when drawing using the pen tool.

    opened by jd-alexander 6
  • Is blank or empty

    Is blank or empty

    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.

    opened by jd-alexander 6
  • Crash

    Crash

    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

    fixed 
    opened by DanteAndroid 2
  • ArrayIndexOutOfBoundsException while drawing

    ArrayIndexOutOfBoundsException while drawing

    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.

    opened by androidmitry 2
  • fix a crash

    fix a crash

    how's the crash happen 1.draw a line or whatever 2.click undo button to clean the screen 3.click Fab 4.click Draw attributes 5.crash

    11-29 10:12:26.286 27036-27036/com.byox.drawviewproject E/AndroidRuntime: FATAL EXCEPTION: main Process: com.byox.drawviewproject, PID: 27036 java.lang.ArrayIndexOutOfBoundsException: length=12; index=-1 at java.util.ArrayList.get(ArrayList.java:310) at

    com.byox.drawview.views.DrawView.getCurrentPaintParams(DrawView.java:340) at

    com.byox.drawviewproject.MainActivity.changeDrawAttribs(MainActivity.java:349) at com.byox.drawviewproject.MainActivity.access$1700(MainActivity.java:34) at com.byox.drawviewproject.MainActivity$9.onClick(MainActivity.java:265) at android.view.View.performClick(View.java:4630) at android.view.View$PerformClick.run(View.java:19339) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:157) at android.app.ActivityThread.main(ActivityThread.java:5335) 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:1265) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) at dalvik.system.NativeStart.main(Native Method)

    opened by IrvingRyan 1
  • how to change the drawview according to setBackgroundImage size

    how to change the drawview according to setBackgroundImage size

    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 ?

    opened by jsh-me 0
  • Cannot set background image loaded via Glide

    Cannot set background image loaded via Glide

    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)
    
    
    opened by ankitivo 0
  • Zoom functionality - It doesn't zoom to edges of the DrawView

    Zoom functionality - It doesn't zoom to edges of the DrawView

    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,

    opened by kyledevportfolio 0
  • IOException error fix

    IOException error fix

    After setting a background image, when i pressed the device home button, IOException error occurs. so i fixed it.

    Error Details : java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.byox.drawview.dictionaries.DrawMove) at android.os.Parcel.writeSerializable(Parcel.java:1786) at android.os.Parcel.writeValue(Parcel.java:1734) at android.os.Parcel.writeArrayMapInternal(Parcel.java:801) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1506) at android.os.Bundle.writeToParcel(Bundle.java:1181) at android.os.Parcel.writeBundle(Parcel.java:841) at android.os.Parcel.writeValue(Parcel.java:1652) at android.os.Parcel.writeSparseArray(Parcel.java:929) at android.os.Parcel.writeValue(Parcel.java:1686) at android.os.Parcel.writeArrayMapInternal(Parcel.java:801) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1506) at android.os.Bundle.writeToParcel(Bundle.java:1181) at android.os.Parcel.writeBundle(Parcel.java:841) at android.os.Parcel.writeValue(Parcel.java:1652) at android.os.Parcel.writeArrayMapInternal(Parcel.java:801) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1506) at android.os.Bundle.writeToParcel(Bundle.java:1181) at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:5166) at android.app.ActivityThread$StopInfo.run(ActivityThread.java:4148) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) Caused by: java.io.NotSerializableException: android.graphics.Matrix at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1233) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1597) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1558) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1481) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1227) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) at android.os.Parcel.writeSerializable(Parcel.java:1781)

    opened by jsh-me 0
  • java.lang.IllegalArgumentException: width and height must be > 0

    java.lang.IllegalArgumentException: width and height must be > 0

        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"

    opened by vyasishanatc194 3
  • IndexOutOfBoundsException on undo redo multiple time press

    IndexOutOfBoundsException on undo redo multiple time press

    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)

    opened by andysagar 1
Owner
Oscar Gilberto Medina Cruz
Software developer, specialized in Android and Java since 4 years ago.
Oscar Gilberto Medina Cruz
A View on which you can freely draw, customizing paint width, alpha and color, and take a screenshot of the content. Useful for note apps, signatures or free hand writing.

FreeDrawView A View that let you draw freely on it. You can customize paint width, alpha and color. Can be useful for notes app, signatures or hands-f

Riccardo Moro 643 Nov 28, 2022
Realtime, Accurate Background Changer, Portrait Segmentation, Portrait Matting, Background Removal for Android

Realtime Background Changer on Camera Stream Realtime, Accurate Background Changer, Portrait Segmentation, Portrait Matting, Background Removal SDK fo

FaceOnLive 87 Dec 30, 2022
A color picker and a color preference for use in Android applications.

HSV-Alpha Color Picker for Android This library implements a color picker and a color preference for use in Android applications. Features I couldn't

Martin Stone 279 Nov 26, 2022
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Swipecards Travis master: A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library create

Dionysis Lorentzos 2.3k Dec 9, 2022
A TagView library for Android. Customize your own & Drag effect.

AndroidTagView An Android TagView library. You can customize awesome TagView by using this library. Screenshots Usage Step 1 Add below dependency in y

lujun 1.7k Dec 29, 2022
🪄 It's a library that helps you customize your notification bar

NotificationBarCustom ?? It's a library that helps you customize your notification bar Demo Contrast(white) Contrast(black) Transparent Setup Add it i

박상선 8 Sep 7, 2022
💳 A quick and easy flip view through which you can create views with two sides like credit cards, poker cards etc.

The article on how this library was created is now published. You can read it on this link here. →. ?? EasyFlipView Built with ❤︎ by Wajahat Karim and

Wajahat Karim 1.3k Dec 14, 2022
Android-ScrollBarPanel allows to attach a View to a scroll indicator like it's done in Path 2.0

Path 2.0 like ScrollBarPanel for Android Android-ScrollBarPanel allows to attach a View to a scroll indicator like it's done in Path 2.0. Features Sup

Arnaud Vallat 551 Dec 22, 2022
A simple library to let you sign (or draw lines) smoothly with your finger into a view and save it.

FingerSignView Introduction FingerSignView is a simple library that lets you finger, or draw lines, smoothly with your finger into a View and save it

Agnaldo Pereira 25 Nov 20, 2022
Simple View to change Brush Size, Alpha and Color

BrushView Simple View to change Brush Size, Alpha and Color Screenshots How to install In your build.gradle project allprojects { repositories {

Andres Ruiz 16 Jun 28, 2018
The CustomCalendarView provides an easy and customizable calendar to create a Calendar. It dispaly the days of a month in a grid layout and allows to navigate between months

Custom-Calendar-View To use the CustomCalendarView in your application, you first need to add the library to your application. You can do this by eith

Nilanchala Panigrahy 113 Nov 29, 2022
Drawing App: A simple drawing application that allows the user to draw using a pencil or using shapes

Drawing-App Drawing app is a simple drawing application that allows the user to

Nada Feteiha 1 Oct 5, 2022
💳 CreditCardView is an Android library that allows developers to create the UI which replicates an actual Credit Card.

CreditCard View CreditCardView is an Android library that allows developers to create the UI which replicates an actual Credit Card. Displaying and en

Vinay Gaba 769 Dec 14, 2022
Code Guide: How to create Snapchat-like image stickers and text stickers.

MotionViews-Android Code Guide : How to create Snapchat-like image stickers and text stickers After spending 2000+ hours and releasing 4+ successful a

Uptech 474 Dec 9, 2022
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Tan Jun Rong 2.6k Jan 5, 2023
Sentinel is a simple one screen UI which provides a standardised entry point for tools used in development and QA alongside device, application and permissions data.

Sentinel Sentinel is a simple one screen UI that provides standardised entry point for tools used in development and QA alongside device, application

Infinum 29 Dec 12, 2022
[] Apply background tinting to the Android system UI when using KitKat translucent modes

Android System Bar Tint Apply background tinting to the Android system UI when using KitKat translucent modes. Android 4.4 (KitKat) introduced translu

Jeff Gilfelt 5.4k Dec 9, 2022
Created a Tinder like Card Deck & Captain Train like Toolbar

TinderView Created A Simple and Beautiful Tinder like card deck & Captain Train like toolbar. This is heavily based on AndroidSwipeableCardStack, wenc

Aradh Pillai 328 Jun 18, 2022
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.

This project isn't maintained anymore. It is now recommended to use https://github.com/peterLaurence/MapView. MapView is maintained by Peter, one of o

Mike Dunn 1.5k Dec 29, 2022