Android Question xCustomListView usage for ask?


Active Member
I want to do a sidemenu with xCustomListView 1.73 ,

my code is

Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    Private clv1 As CustomListView
    Private lblIcon As B4XView
    Private lblItem As B4XView
    Private pnlClv1 As B4XView
End Sub

Public Sub Initialize
'    B4XPages.GetManager.LogEvents = True
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Dim p As Panel
    Dim l,t As Object
    l = clv1.AsView.Width
    t = 80dip

    For I = 0 To 19
        p = MenuIconListItem("Menu:" & (I+1),l,t,Chr(0xF1B9))
        clv1.Add(p,"submenu" & I)
End Sub

Sub MenuIconListItem(Text As String, W As Int, H As Int, Icon As String) As Panel
    Dim p As Panel
    lblIcon.Text = Icon
    Return p
End Sub

My questions are :

1. after a menu item was selected, how to keep it on the pressed color?

2. the Icon which Icon picker got can't be showed, it is X

3. does it have the function set the focus of itemlist,or can I set highlight item? I want to use it on TV.


Licensed User
Longtime User
I want to do a sidemenu with xCustomListView 1.73 ,
Are you looking for something like this: Either way, when you post lots of code with layouts with many views, you are better off exportind your project so you can get help. People are not going to figure out what your layouts look like. Post your project and explain what you want

Upvote 0


Active Member
Thanks a lot for your advice. I will post a on my next question.
This thread have been solved with xCustomListView 1.52.

Two attributes HighLight Selected Item and HighLight Selected Color have been removed in xCustomListView1.73, I wonder what substitute they have.
Upvote 0