Android Question Create listview into scrollview with manual code

FabioCirillo

Member
Licensed User
Longtime User
hi
i must create a listview with code into scrollview.
This is my code:

Sub Globals
Dim countgironi As Int
Dim ListView As ListView
Dim Sc As ScrollView
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("frmgironi")
Activity.Title ="GIRONI"
ListView.Initialize(200dip)
Sc.Panel.AddView(ListView,20%x,100%y,100dip,80dip)
ListView.FastScrollEnabled=True
ListView.AddSingleLine ("player")
End Sub

but when I start the activity you do not see the listview, where am I wrong? can you help me?

Bye
 

Hilton

Active Member
Licensed User
Longtime User
You cannot nest scrollviews. I guess the parent view gobbles up the scroll events and uses them. To obviate that problem you will have to add buttons within the scrollview that perform the movement within child any scrolling view such multi-line edit or listview.
Bye.
 
Upvote 0

FabioCirillo

Member
Licensed User
Longtime User
I understand, but now my problem is to create and run the listview scroll because the number of listview that I create can change depending on a value that I get from a db table. in practice to make it clear I have to make the rounds of a soccer tournament. The listview represent the group, so I thought I'd do, but if you have a better idea are available
 
Upvote 0

FabioCirillo

Member
Licensed User
Longtime User
then I in a db table I have a value that can always change this valoreè the number of listview that I have to create, in an Activity that the size of a galaxy s3 if there are many listview of course it may happen that some are created at the bottom and I have not seen ... risolver andthe problem in case of listview were created but can not be seen because the screen size is small
 
Upvote 0
Top