Android Question CustomListView increases DividerHeight

Bob Spielen

Active Member
Licensed User
Hi,
Every time I execute ExpandItem and then CollapseItem, the gap between the 2 panels in the CustomListView 1.65 - modified version , increases by 1 x DeviderHeight.
Can you help me to figure out ? In advance thank you very much.
 

Bob Spielen

Active Member
Licensed User
Erel, thanks for the fast reply.
Example project works fine.

But my code..... not.....

Attached you can see some pictures about what is happening.

My code:

B4X:
Sub CollapseItem(index As Int, CollapsedHeight As Int)
    'clv3.ResizeItem(index, CollapsedHeight)
    clv3.ResizeItem(index, 0)
    Dim Vars As Map
    Vars.Initialize
    Vars= clv3.GetPanel(index).Tag
    Vars.Put("collapsed", True)
    clv3.GetPanel(index).Tag = Vars
 
End Sub



Sub CLV3_ItemClick (Index As Int, Value As Object)
    Dim Vars As Map
 
    For i = 0 To clv3.GetSize - 1
     
            Vars.Initialize
            Vars = clv3.GetPanel(i).Tag
            Try
             
                If Vars.Get("pedidonr") = Value Then
            
                   If Vars.Get("collapsed") = False Then
                          CollapseItem(i, Vars.Get("itemheight"))
                   Else
                        ExpandItem(i,Vars.Get("itemheight"))
                   End If
                End If
             
             
            Catch
                Log(LastException)
            End Try
         
         
      
    Next
 
End Sub
 

Attachments

  • 1.png
    136.5 KB · Views: 302
  • 2.png
    304.2 KB · Views: 313
  • 3.png
    144.7 KB · Views: 293
Last edited:
Upvote 0

Bob Spielen

Active Member
Licensed User
Uploading a part of the project, where you can see whats going on.
An advance, thank you very much for you help.
 

Attachments

  • CLV99.zip
    35 KB · Views: 275
Upvote 0

Bob Spielen

Active Member
Licensed User
Do you have a connection? It is searching for a connection to populate the data file.
Attached the files...... In the Starter service module it places a new directory ....DirRootExternal & "/" & DigiBob , where the attached files should be placed...

Please then in the Main Activity_create() substitute

"Populate" with "CallSubDelayed2(clsChgStep, "BuildClv21", 99)"

Thank you very much.......
 

Attachments

  • Files.zip
    2.7 KB · Views: 272
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…