Android Question [SOLVED] add Spinner to List

mw71

Active Member
Licensed User
Longtime User
hi

works:
Dim lSpinner As List
lSpinner.Initialize2(Array (Spinner1,Spinner2,Spinner1_E,Spinner2_E))

dont work:
lSpinner.AddAll(Array (spn_Backup_Mode,spn_Backup_WTag,spn_Backup_ink))
or
lSpinner.add(spn_Backup_Mode)

what can i do to add the Spinner to the List?
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
Did you initialize the list before trying the .AddAll & .Add? Do you get an error?

- Colin.
 
Upvote 0

mw71

Active Member
Licensed User
Longtime User
Did you initialize the list before trying the
yes, first i initialize the list with initialize2

Dim lSpinner As List
lSpinner.Initialize2(Array(Spinner1,Spinner2,Spinner1_E,Spinner2_E))
lSpinner.Addall(spn_Backup_Mode,spn_Backup_WTag,spn_Backup_ink))...


After your post I tested:
lSpinner.Initialize
lSpinner.AddAll(Array(Spinner1,Spinner2,Spinner1_E,Spinner2_E))
lSpinner.Addall(spn_Backup_Mode,spn_Backup_WTag,spn_Backup_ink))...

Now it works


Did you initialize the list before trying the .AddAll & .Add? Do you get an error?
yes, for information:
Error occurred on line: 13592 (Main)
java.lang.UnsupportedOperationException
at java.util.AbstractList.add(AbstractList.java:148)
at java.util.AbstractList.add(AbstractList.java:108)
at java.util.AbstractCollection.addAll(AbstractCollection.java:344)
at anywheresoftware.b4a.objects.collections.List.AddAll(List.java:92)
at de.udxsoft.udxlog.main._resetuserfontscale_go(main.java:61281)
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:348)
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:370)
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:6746)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…