J'essaie de construire une mise en page où il y a une vue de texte en haut de l'écran et une barre inférieure en bas de l'écran. Chacune de ces vues doit rester fixe et entre les deux doit être un ListView.Mise en page Android avec ListView entre une «barre supérieure» et une «barre inférieure»
TOPBAR
LISTVIEW (scrollable)
BOTTOM BAR
Ma mise en page (voir ci-dessous) presque œuvres: les composants haut et en bas restent fixes et les rouleaux de ListView. Le "problème" est que la dernière rangée de ma ListView reste cachée derrière la barre inférieure.
Des suggestions sur la façon d'ajuster la disposition?
Merci!
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_alignParentTop="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<TextView
android:background="@drawable/blackgrad"
android:gravity="center"
android:id="@+id/title"
android:layout_height="50dip"
android:layout_width="fill_parent"
android:text="blah blah"
android:textColor="#ffffff"
android:textSize="18sp"
/>
<ListView
android:background="#ffffff"
android:cacheColorHint="#ffffffff"
android:id="@android:id/list"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
/>
</LinearLayout>
<LinearLayout
android:background="#efefef"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:orientation="horizontal">
<Button
android:layout_height="wrap_content"
android:id="@+id/back"
android:text="Back"
android:layout_width="wrap_content" />
<Button
android:layout_height="wrap_content"
android:id="@+id/home"
android:text="Home"
android:layout_width="wrap_content" />
<Button
android:layout_height="wrap_content"
android:id="@+id/next"
android:text="Next"
android:layout_width="wrap_content" />
</LinearLayout>
</RelativeLayout>
Cela ne fonctionnera pas. Le texte en bas couvrira une partie du bas de la liste. – Falmarri
@Falmarri, dans mes mains le pied de page de cette mise en page ne couvre pas du tout le bas de la liste. – user141146
@Falmarri, je l'essaie en ce moment et son fonctionnement juste comme prévu. Il semble fonctionner pour user141146 aussi bien. – glr