Private Sub AddFileItem (img As Bitmap, filename As String) As B4XView
Dim filelistpanel As Panel = xui.CreatePanel("FileListPanel")
filelistpanel.SetLayoutAnimated(0,0,0,100%x,60dip)
filelistpanel.LoadLayout("FileListItem")
FL_icon.Bitmap = img
Fl_label.Text = filename
End Sub
Error occurred on line: 308 (Main)
java.lang.NullPointerException: Attempt to invoke virtual method 'int anywheresoftware.b4a.objects.B4XViewWrapper.getHeight()' on a null object reference
at b4a.example3.customlistview._insertat(customlistview.java:537)
at b4a.example3.customlistview._add(customlistview.java:71)
at b4a.example.main._decodemsg(main.java:844)
at b4a.example.main._astreams_newdata(main.java:666)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA$2.run(BA.java:387)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
I know you are very new to the forum, but when you solve the problem yourself, as a courtesy to others. you really need to explain in the post how you solved it, so other members who may have a same problem can benefit. Also, your code will stand out if you use code tags to display code in your posts