Android Question Multi(Select)Spinner auf CustomListView

RauchG

Active Member
Licensed User
Longtime User
Hello,

thanks to Klaus, DonManfred and Johan Schoeman.

I use the "Custom listview" by Klaus and I would like to have a "multi select spinner". Klaus refers to the "B4EXCEPT guide/12.4.2 Adding a custom view by code"

I then the class module/custom view is created.

B4X:
Public Sub AddToParent(Parent As Panel, Left As Int, Top As Int, Width As Int, Height As Int)


    mBase.Initialize("mBase")
    mBase.Color = Colors.Green

    Parent.AddView(mBase, Left, Top, Width, Height)


End Sub

So I create a panel on the custom list view.

B4X:
clsTest2.AddToParent(P, 2dip, 83dip, 338dip, 48dip)

How can i now on the new panel of the custom list view a "multi-select spinner" view or in place of the new panel just a "multi-select spinner"

Thank you for your help.
greeting RauchG


Translated with "babylon"
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
See the CustomListView example: https://www.b4x.com/android/forum/t...xible-list-based-on-scrollview.19567/#content

Change Button1_Click sub to:
B4X:
Sub Button1_Click
   Dim checkedItems As List
   checkedItems.Initialize
   For i = 0 To clv2.GetSize - 1
     Dim p As Panel = clv2.GetPanel(i)
     Dim chk As CheckBox = p.GetView(2)
     If chk.Checked Then
       checkedItems.Add(clv2.GetValue(i))
     End If
   Next
   Log("Checked items: " & checkedItems)
End Sub
It will create a list with all the checked items.
 
Upvote 0

RauchG

Active Member
Licensed User
Longtime User
Hello Erel,
thank you for your reply.

To your custom list view" can i get the "Multi-select spinner" of DonManfred. So I can now continue to work.

Greeting RauchG
 

Attachments

  • CustomListViewRh.zip
    11.3 KB · Views: 274
Upvote 0
Top