[HELP!] Delete an element in a scrollview Force Close
Hello,
:sign0085:
I am trying to delete an element in a scrollview. I also want an animation when I delete it. The way I do it now, is triggering the animation before the delete, then when the animation is finished, I update the scrollview by removing all views it contains and the refilling it.
But it crashes.... (Force Close)
Could you please tell me what am I doing wrong? I attach the file with this message.
To replicate the crash: Long click on an item in the list.
This is the error I get:
Regards
Hello,
:sign0085:
I am trying to delete an element in a scrollview. I also want an animation when I delete it. The way I do it now, is triggering the animation before the delete, then when the animation is finished, I update the scrollview by removing all views it contains and the refilling it.
But it crashes.... (Force Close)
Could you please tell me what am I doing wrong? I attach the file with this message.
To replicate the crash: Long click on an item in the list.
This is the error I get:
B4X:
java.lang.NullPointerException
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1374)
at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1375)
at android.view.View.draw(View.java:6845)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at android.view.ViewGroup.drawChild(ViewGroup.java:1648)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1375)
at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1375)
at android.view.View.draw(View.java:6742)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at android.view.ViewGroup.drawChild(ViewGroup.java:1648)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1375)
at android.view.View.draw(View.java:6742)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1872)
at android.view.ViewRoot.draw(ViewRoot.java:1422)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1167)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1744)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Attachments
Last edited: