Hallo,
nachdem ich mit dem Beispielprogramm xCustomListView.zip etwas experimentiert habe
und etwas am Aussehen ändern wollte, nämlich bei den gemeinsamen Eigenschaften
von ColorDrawable zu GradientDrawable bekam ich folgende Fehlermeldung:
Ohne diese Änderung gibt es keine Probleme.
Habe ich hier etwas übersehen?
mfg und Alles Gute für 2019
Jürgen
edit:
habe bemerkt, ich hatte noch die Version 1.20 von CustomListView. Habe nun auf die
Version 1.66 aktualisiert, der Fehler ist der gleich, nur jetzt in Zeile 94
nachdem ich mit dem Beispielprogramm xCustomListView.zip etwas experimentiert habe
und etwas am Aussehen ändern wollte, nämlich bei den gemeinsamen Eigenschaften
von ColorDrawable zu GradientDrawable bekam ich folgende Fehlermeldung:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 55 (CustomListView)
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.res.ColorStateList.getDefaultColor()' on a null object reference
at anywheresoftware.b4a.objects.B4XViewWrapper.getColor(B4XViewWrapper.java:386)
at b4a.example3.customlistview._designercreateview(customlistview.java:751)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:738)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:360)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:61)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at b4a.example3.main._activity_create(main.java:387)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:738)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:360)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at b4a.example3.main.afterFirstLayout(main.java:104)
at b4a.example3.main.access$000(main.java:17)
at b4a.example3.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6863)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
** Activity (main) Resume **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 55 (CustomListView)
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.res.ColorStateList.getDefaultColor()' on a null object reference
at anywheresoftware.b4a.objects.B4XViewWrapper.getColor(B4XViewWrapper.java:386)
at b4a.example3.customlistview._designercreateview(customlistview.java:751)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:738)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:360)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:61)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at b4a.example3.main._activity_create(main.java:387)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:738)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:360)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at b4a.example3.main.afterFirstLayout(main.java:104)
at b4a.example3.main.access$000(main.java:17)
at b4a.example3.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6863)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
** Activity (main) Resume **
Ohne diese Änderung gibt es keine Probleme.
Habe ich hier etwas übersehen?
mfg und Alles Gute für 2019
Jürgen
edit:
habe bemerkt, ich hatte noch die Version 1.20 von CustomListView. Habe nun auf die
Version 1.66 aktualisiert, der Fehler ist der gleich, nur jetzt in Zeile 94
Last edited: