MotionViews-Android icon indicating copy to clipboard operation
MotionViews-Android copied to clipboard

Remove entity

Open dimasvm opened this issue 7 years ago • 3 comments

hay uptech, this is so awesome app for adding sticker/text to our own image. But , how can I delete entity ?? since your app doesn't include delete feature. ..

dimasvm avatar May 03 '17 03:05 dimasvm

Once you have selected any entity, you can delete by calling "motionView.deletedSelectedEntity()" method.

seeamarnath avatar May 04 '17 08:05 seeamarnath

I want to adding bitmap file as sticker, and I put this in my code : `private void addImage(final Bitmap bitmap) { motionView.post(new Runnable() { @Override public void run() { Layer layer = new Layer(); ImageEntity entity = new ImageEntity(layer, bitmap, motionView.getWidth(), motionView.getHeight());

            motionView.addEntityAndPosition(entity);
        }
    });
}`

But, error was occured. It gives me : java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at team.uptech.motionviews.widget.entity.ImageEntity.<init>(ImageEntity.java:24) at team.uptech.motionviews.ui.MainActivity$3.run(MainActivity.java:111) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5441) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)

Could you help this ? How could I set bitmap as same as sticker ?

dimasvm avatar May 06 '17 08:05 dimasvm

@dimasvm seems like your Bitmap is released somewhere. Track plz where it could happen.

AndriyBas avatar Feb 27 '18 14:02 AndriyBas