B4A Library [B4X] [XUI] SD XUIView2

FrankDev

Active Member
Licensed User
Longtime User
I have another problem
when I click nothing happens

xgridlistview_sample

B4X:
Private Sub xListView1_ItemClick(Text As String,Value As Object)
    ToastMessageShow("Click " & Value,True)
End Sub
 

Star-Dust

Expert
Licensed User
Longtime User
Correct the sub name like this:
B4X:
Private Sub xGridListView1_ItemClick(Text As String,Value As Object)
    Log("Click " & Value)
End Sub
It was a typo. I corrected the example
 

FrankDev

Active Member
Licensed User
Longtime User
I have one more question

do I set
xGridListView1.ElementBackgroundColor = Colors.Gray

with 'xGridListView1.AddWithImage' the background is uniformly gray.

At
'xGridListView1.InsertWithImageAt' it is a gradient.

Can I change this with the shadow too ?
or the line around the button.
(there is a black line with width 1 pix ?)

regards
Frank
 

Star-Dust

Expert
Licensed User
Longtime User
I'm not sure I understand what you want to achieve

Both AddWithImageAt and InsertWithImageAt get the same result, because the first inserts at the end of the list and the second at a precise position, but graphically nothing changes. The image refers to the Logo next to the text.

What exactly do you need to achieve?
 

FrankDev

Active Member
Licensed User
Longtime User
I put this at the very beginning

xGridListView1.ElementBackgroundColor = Colors.Gray

the backgrounds do not look the same.
with some there is a gradient
 

Star-Dust

Expert
Licensed User
Longtime User
Yes, it automatically inserts a gradient and shadow effect
 

Star-Dust

Expert
Licensed User
Longtime User
Update rel 0.12

  • Fixed bug in xGridLisrView class. Second Line Colors and Info now take effect
 
Last edited:

JGParamo

Active Member
Licensed User

Attachments

  • 1686886864335.png
    4.3 KB · Views: 158

Star-Dust

Expert
Licensed User
Longtime User
Update rel 0.13

  • Fixed bug in xListView class. Second Line Colors and Info now take effect
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Update 0.15
  • Addedd ScrollToBottom to xListView and xGridListview
 

Star-Dust

Expert
Licensed User
Longtime User
Update 0.16
  • Added LatelarBarWidth to xGridListView
  • Fix bug
 

javiers

Active Member
Licensed User
Longtime User


I can't get the background color of some items to remain the desired color. At the moment they have the design color again...

B4J:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
'    xGridListView1.ItemWidth=300dip
'    xGridListView1.ItemHeight=400dip
    'log("Num cols max (for 150dip) is:" & xGridListView1.MaxCol)
    xGridListView1.SetCol(2)
    
    For i=1 To 12
'        xGridListView1.AddWithImage($"Voce ${i}"$,"Second","info",i,xui.LoadBitmap(File.DirAssets,"sd.png"),True)
        xGridListView1.Add($"Voce ${i}"$,"Second","info",i)
        If (i Mod 2)=0 Then
            ' Es un número par
            xGridListView1.setSingleItemColorBackground(i,0xFFFF0000)
        Else
            'Es un número impar
            xGridListView1.setSingleItemColorBackground(i,0xFF00FF06)
        End If
    Next
End Sub



 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…