Salut,

J'ai un grand tableau (quelques 200 lignes 20 colonnes environ). Ce tableau est inclu dans un scroll vertical et un scroll horizontal. Par contre je voudrais lors de mon scroll peu importe le sens, que la première ligne et la première colonne reste à l'écran.

Pour l'instant, j'ai lors de mon scroll vertical, la 1ère ligne qui reste bien figée, par contre lors du scroll horizontal je perds la 1ère colonne.

Comment faire pour garder cette première colonne ?


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation = "vertical"
   android:layout_width = "fill_parent"
   android:layout_height = "fill_parent"
   >
 
   <HorizontalScrollView
       android:id = "@+id/H_scrllvwNo1"
       android:layout_width = "fill_parent"
       android:layout_height="wrap_content">
 
       <LinearLayout
           android:orientation = "vertical"
           android:layout_width = "fill_parent"
           android:layout_height="wrap_content">
 
 
            <TableLayout
                xmlns:android = "http://schemas.android.com/apk/res/android"
                android:layout_height = "fill_parent"
                android:layout_width = "fill_parent"
                android:background="#000000">
 
                <TableRow>
                    <TextView android:id="@+id/feat_name1"
                        android:text = "Produit1"
                        android:textColor = "#ffffff"
                        android:maxWidth = "70px"
                        android:minWidth="70px"
                        android:onClick = "onClick"
                        android:clickable = "true"/>
			.
			.
			Toutes mes colonnes...
			.
			.
 
                </TableRow>
            </TableLayout>
 
            <ScrollView
                android:id = "@+id/scrllvwNo1"
                android:layout_width = "fill_parent"
                android:layout_height="wrap_content">"
 
                <TableLayout
                    xmlns:android = "http://schemas.android.com/apk/res/android"
                    android:layout_height = "fill_parent"
                    android:layout_width = "fill_parent"
                    android:background="#000000">
 
                    <TableRow android:background="#000066">
                       	.
			.
			.
			Toutes mes colonnes...
			.
			.
                    </TableRow>
		    .
		    .
		    .
		    Toutes mes lignes...
		    .
		    .
		    .
 
                    <TableRow android:background="#000000">
                        .
			.
			.
			Toutes mes colonnes...
			.
			.
                    </TableRow>
 
                </TableLayout>
            </ScrollView>
        </LinearLayout>
    </HorizontalScrollView>
</LinearLayout>