Android Question [SOLVED] add Spinner to List

Discussion in 'Android Questions' started by mw71, Apr 14, 2019.

  1. mw71

    mw71 Active Member Licensed 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?
     
  2. Computersmith64

    Computersmith64 Well-Known Member Licensed User

    Did you initialize the list before trying the .AddAll & .Add? Do you get an error?

    - Colin.
     
  3. mw71

    mw71 Active Member Licensed User

    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:)


    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)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice