Hi All,
Still on learning curve for CLV I've struck a couple of oddities.
1. in the code below [using Loadlayout] if I include the lines [3&4 commented out] to align sv with CLV I have no items displayed. ???
With these two lines commented out all works well.
2. With the code below [ using CLV.AddTextItem ] if I don't include the lines to align sv with CLV only the first 5 items are displayed until I scroll down. ???
If I include the lines to align sv with CLV all 7 items are displayed but there is a space of about 1 item between the Title and the first item.
I can get around the enigma but the fact that these oddities are there tells me I am doing something wrong.
Is there a smart person out there who knows the answer/s.
Regards Roger.
Still on learning curve for CLV I've struck a couple of oddities.
1. in the code below [using Loadlayout] if I include the lines [3&4 commented out] to align sv with CLV I have no items displayed. ???
With these two lines commented out all works well.
Menu:
Sub Menu
ListFlag = 1
'Change CustomListView from default to the Menu Size/Position
AllListView.getbase.Height = 200dip 'Sets height and top position of CLV
AllListView.getbase.Top = 100%y -AllListView.getbase.Height
' AllListView.sv.Height = AllListView.getbase.Height 'Sets sv to match CLV
' AllListView.sv.Top = AllListView.getbase.Top
'
AllListTitle.Top = AllListView.GetBase.Top - AllListTitle.Height 'Set title label at top of CLV
AllListBack.Top = AllListTitle.Top 'Sets back button at top of CLV
AllListTitle.Text = "MENU"
AllListBack.Text = "<<<"
AllListClear.Visible = False 'Hides clear button
AllListClear.Enabled = False
'Sets CLV as MENU)
AllListView.Clear 'Clear CLV before populating or else you get duplicates
'Load 5 items. Yes a loop would look better but ........
Public ALVitem As B4XView = XUI.createpanel("")
ALVitem.SetLayoutAnimated(100,0,0,100%x,40dip)
ALVitem.LoadLayout("CLVmenu") 'Loads layout from designer [One label 100%x * 40]
lblMenuItem.Text = "ABOUT"
lblMenuItem.Height = ALVitem.Height
AllListView.Add(ALVitem,0)
Public ALVitem As B4XView = XUI.createpanel("")
ALVitem.SetLayoutAnimated(100,0,0,100%x,40dip)
ALVitem.LoadLayout("CLVmenu")
lblMenuItem.Text = "HELP"
lblMenuItem.Height = ALVitem.Height
AllListView.Add(ALVitem,0)
Public ALVitem As B4XView = XUI.createpanel("")
ALVitem.SetLayoutAnimated(100,0,0,100%x,40dip)
ALVitem.LoadLayout("CLVmenu")
lblMenuItem.Text = "SETTINGS"
lblMenuItem.Height = ALVitem.Height
AllListView.Add(ALVitem,0)
Public ALVitem As B4XView = XUI.createpanel("")
ALVitem.SetLayoutAnimated(100,0,0,100%x,40dip)
ALVitem.LoadLayout("CLVmenu")
lblMenuItem.Text = "EXPORT FUNCTION"
lblMenuItem.Height = ALVitem.Height
AllListView.Add(ALVitem,0)
Public ALVitem As B4XView = XUI.createpanel("")
ALVitem.SetLayoutAnimated(100,0,0,100%x,40dip)
ALVitem.LoadLayout("CLVmenu")
lblMenuItem.Text = "IMPORT FUNCTION"
lblMenuItem.Height = ALVitem.Height
AllListView.Add(ALVitem,0)
PnlAllListView.Elevation = 4dip
End Sub
2. With the code below [ using CLV.AddTextItem ] if I don't include the lines to align sv with CLV only the first 5 items are displayed until I scroll down. ???
If I include the lines to align sv with CLV all 7 items are displayed but there is a space of about 1 item between the Title and the first item.
I can get around the enigma but the fact that these oddities are there tells me I am doing something wrong.
Is there a smart person out there who knows the answer/s.
Regards Roger.