Italian ScrollView di un Layout

PakoT52

Active Member
Licensed User
Longtime User
Ciao ragazzi stavo imparando ad usare lo scrollview , dopo aver letto numerosi esempi e questioni di altri utenti ho provato a farlo io , ho provato a fare lo scroll di un layout dove all'interno c'è un listview solo che si vede tutto bianco , come mai ? Vi allego il progetto
 

Attachments

  • Esempio.zip
    385.5 KB · Views: 179

klaus

Expert
Licensed User
Longtime User
There are two problems in your code :
1) You load the layout 'lol' where you have the ScrollView with the name ScrollView1
and in the code you define a ScrollView with the name scv and you initialize it !
Rename the ScrollView in the lol layout scv
2) You initialize a new ScrollView and you don't add somewhere.
Remove the line scv.Initialize(1000dip) !

Why do you want to put a ListView onto a ScrollView ?
ListView scrolls on its own.
You will probably have some trouble in the scrolling because both ListView already uses the scroll event !

Attached a modified version using only the ListView.

Best regards.
 

Attachments

  • Esempio1.zip
    7.9 KB · Views: 171

PakoT52

Active Member
Licensed User
Longtime User
There are two problems in your code :
1) You load the layout 'lol' where you have the ScrollView with the name ScrollView1
and in the code you define a ScrollView with the name scv and you initialize it !
Rename the ScrollView in the lol layout scv
2) You initialize a new ScrollView and you don't add somewhere.
Remove the line scv.Initialize(1000dip) !

Why do you want to put a ListView onto a ScrollView ?
ListView scrolls on its own.
You will probably have some trouble in the scrolling because both ListView already uses the scroll event !

Attached a modified version using only the ListView.

Best regards.
Thanks you Klaus . I Put listview into a ScrollView beacause , i have some Listview , but i find another solution .Thanks you
 
Top