Bonjour,

j'ai un souci avec une ScrollView qui fonctionne sur la plupart de mes pages mais pas sur celles où j'ai plus de deux LinearLayouts imbriqués.

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
 
<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:fillViewport="true"
    android:scrollbars="none">
 
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
 
        <LinearLayout
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1">
 
            <TextView ... />
        </LinearLayout>
 
        <LinearLayout
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1">
 
            <TableLayout
                android:orientation="horizontal"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:stretchColumns="*"
                android:shrinkColumns="*">
                <TableRow>
                    <Button
                        android:id="@+id/cancel_btn"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        style="@style/cancel_button" />
 
                    <Button
                        android:id="@+id/ok_btn"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        style="@style/ok_button" />
                </TableRow>
            </TableLayout>
 
            <TextView
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                ... />
 
        </LinearLayout>
    </LinearLayout>
</ScrollView>
Le but de cette organisation en layouts imbriqués est d'avoir la moitié de l'écran occupée par un texte, puis deux boutons en dessous puis le bas (le reste) occupé par un texte.

Le problème, c'est que sur les petits écrans le texte du bas est caché et la ScrollView ne fonctionne pas.

Merci d'avance pour votre aide.