J'ai une liste avec un nombre variable d'éléments. Lorsqu'il n'y a que peu d'éléments à remplir sur l'ensemble de l'écran, je souhaite que l'arrière-plan du pied de page s'étende jusqu'à l'image en bas de l'écran. Comment puis-je y parvenir?étirement d'un élément dans listview
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/savings_details_activity_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView
android:id="@+id/default_list_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fadeScrollbars="true"
android:footerDividersEnabled="false"
android:headerDividersEnabled="false"
android:smoothScrollbar="true"
android:listSelector="@color/transparent" />
<ImageView
android:id="@+id/bottom_bar"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:src="@drawable/action_bar_background"
android:layout_alignParentBottom="true" />
</RelativeLayout>
Liste des articles
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="60dp"
android:paddingLeft="@dimen/margin_10dp"
android:paddingRight="@dimen/margin_10dp" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/margin_10dp"
android:layout_marginRight="@dimen/margin_10dp"
android:layout_toLeftOf="@+id/list_item_value"
android:layout_toRightOf="@+id/header_image"
android:orientation="vertical">
<TextView
android:id="@+id/list_item_header"
style="@style/LargeTextWhiteWithShadow"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:text="header" />
<TextView
android:id="@+id/list_item_sub_header"
style="@style/SmallTextLightBlueWithShadow"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:text="sub header" />
</LinearLayout>
<TextView
android:id="@+id/list_item_value"
style="@style/LargeTextWhiteWithShadow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/margin_5dp"
android:layout_alignParentRight="true"
android:ellipsize="end"
android:singleLine="true"
android:text="value"/>
</RelativeLayout>
J'ai un pied de page listview qui est juste une image. Peu m'importe si j'étire le pied de liste ou le dernier élément de la liste.
Voulez-vous vous imageView à l'arrière-plan si vous avez beaucoup d'articles, ou exaclty quoi? – Houcine
en d'autres mots je veux aligner le pied de page dans ma liste avec le bottom_bar (imageview) s'il y a "air" entre la liste et la barre de fond – Flexo
@Houcine the bottom_bar fonctionne comme il se doit, je veux juste le pied de ma liste pour étendre à la barre de fond lorsque la liste est courte – Flexo