ScrollView horizontal et vertical
Bonsoir,
Je souhaite afficher au sein de mon application un simple tableau avec 4 colonnes et plusieurs lignes. je n'ai pas pu afficher la totalité de mon tableau , donc je souhaite ajouter une scroll dans les deux sens : horinzontal et vertical.
J'ai ajouté a mon fichier XML une ScrollView verticale:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:scrollbars="vertical" >
<ListView
</ListView>
</LinearLayout>
</ScrollView> |
Mais l'affichage constitue seulement une ligne :( , et le reste est vide.
par exemple, j'ai un un tableau de 5 lignes, le scroll ne m'affiche que le premier ligne.
Ma question:
- Comment je peux agrandir le ScrollView verticalement pour qu'il s'occupe la totalité de l’émulateur??
- Comment je peux combiner le ScrollView dans les deux sens??
Merci