Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to add image which is selected from gallary as a sticker? #24

Open
rahul107 opened this issue Jul 18, 2017 · 1 comment
Open

how to add image which is selected from gallary as a sticker? #24

rahul107 opened this issue Jul 18, 2017 · 1 comment

Comments

@rahul107
Copy link

Error Accured

java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
at com.example.abner.stickerdemo.view.StickerView.isInBitmap(StickerView.java:430)
at com.example.abner.stickerdemo.view.StickerView.onTouchEvent(StickerView.java:288)
at android.view.View.dispatchTouchEvent(View.java:9306)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2198)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2198)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2198)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2198)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2198)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2198)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2198)
at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2403)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1737)
at android.app.Activity.dispatchTouchEvent(Activity.java:2820)
at android.support.v7.internal.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
at android.support.v7.internal.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2364)
at android.view.View.dispatchPointerEvent(View.java:9526)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4267)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4133)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3674)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3727)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3693)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3819)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3701)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3876)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3674)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3727)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3693)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3701)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3674)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5959)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5933)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5894)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6062)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:187)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:323)
at android.os.Looper.loop(Looper.java:138)
at android.app.ActivityThread.main(ActivityThread.java:5527)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)

@aZyreTech
Copy link

get your selected image bitmap and set it in a stickerView using stickerView.setBitmap(bitmap);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants