I want to do a sidemenu with xCustomListView 1.73 ,
my code is
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.
my code is
B4X:
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
Root.LoadLayout("MainPage")
Dim p As Panel
Dim l,t As Object
l = clv1.AsView.Width
t = 80dip
clv1.Clear
For I = 0 To 19
p = MenuIconListItem("Menu:" & (I+1),l,t,Chr(0xF1B9))
clv1.Add(p,"submenu" & I)
Next
End Sub
Sub MenuIconListItem(Text As String, W As Int, H As Int, Icon As String) As Panel
Dim p As Panel
p.Initialize("")
p.SetLayout(0,0,W,H)
p.LoadLayout("itemlist")
lblIcon.Text = Icon
lblItem.Text=Text
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.