Image de l'interface Android: http://tinypic.com/view.php?pic=avht6w&s=6Comment rendre le dernier TableRow visible?
Comme on le voit dans l'image ci-dessus, je veux un petit frontières au bas et le haut du listView blanc. Le problème est, comme je l'ai mis à tableRow pour être android: paddingBottom = "20dp" la bordure ne s'affiche jamais en bas. Il semble que, si la taille de la liste des vues est assez grande, rien d'autre ne sera affiché après (voir l'exemple de code ci-dessous pour comprendre). J'ai testé différentes approches pour résoudre le problème, l'une est de définir l'attribut paddingBottom dans la TableRow suivante (les bordures de table) mais cela ne fonctionnera que si la hauteur de listView est exacte de la hauteur des écrans et non de la taille.
Pourquoi est-ce que je règle la taille de listView à un nombre fixe comme 415dp? Eh bien, c'est dû à un autre problème que je ne sais pas comment résoudre. Si, par exemple, je définis la taille de listViews sur fill_parent, l'arrière-plan ne couvrira que le nombre d'éléments de la liste. Je veux toujours que l'arrière-plan des listes soit rempli à 20dp depuis le bas de l'interface.
Si quelqu'un a des idées sur la façon dont je peux afficher la bordure en bas et que l'arrière-plan des listes est toujours visible, même s'il n'est pas rempli d'éléments, postez vos idées! /Merci beaucoup!
<?xml version="1.0" encoding="utf-8"?>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/orginalbild"
android:gravity="center|top"
android:stretchColumns="1"
android:weightSum="1.0"
android:fillViewport="true">
<TableRow
android:background="#000000"
>
<TextView
android:layout_marginTop="0.15dp"
android:layout_width="fill_parent"
android:layout_height="2dp"
android:background="#999999"
android:layout_weight="1">
</TextView>
</TableRow>
<TableRow
android:background="#999999"
>
<TextView
android:background="#999999"
android:id="@+id/show_task_feedback_title"
android:layout_width="0dip"
android:layout_height="28dp"
android:layout_weight="0.8"
android:text="@string/LatestFeedbackTitle"
android:textColor="#ffffff"
android:textSize="17dp"
android:shadowColor="#FFFFFF"
android:layout_marginBottom="0.15dp"
android:textAppearance="?android:attr/textAppearanceMedium">
</TextView>
<TextView
android:layout_width="0dip"
android:layout_height="28dp"
android:layout_gravity="center"
android:layout_weight="0.08" >
</TextView>
<Button
android:id="@+id/latest_feedback_help_button"
android:layout_width="0dip"
android:layout_height="28dp"
android:layout_gravity="center"
android:background="@drawable/help_button"
android:layout_weight="0.12"
android:layout_marginBottom="0.15dp"
/>
</TableRow>
<TableRow
android:background="#212421">
<TextView
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#ffffff"
android:layout_marginTop="0.15dp"
android:layout_weight="1">
</TextView>
</TableRow>
<TableRow>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.25" />
</TableRow>
<TableRow
android:paddingLeft="24dp"
android:paddingRight="24dp"> <--------THE BLACK BRODER AT THE TOP OF THE LISTVIEW
<TextView
android:background="#000000"
android:layout_width="0dip"
android:layout_height="0.5dp"
android:layout_weight="1" >
</TextView>
</TableRow>
<TableRow
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:paddingBottom="20dp" <------(paddingBottom attribute which causes the problem)
>
<ListView
android:background="#ffffff"
android:id="@+id/bookmarks_list"
android:layout_width="0dip"
android:layout_height="415dp"
android:gravity="left"
android:layout_weight="1"
/>
</TableRow>
<TableRow> <---THE BLACK BRODER AT THE BOTTOM OF THE LISTVIEW(not being displayed)
<TextView
android:background="#000000"
android:layout_width="0dip"
android:layout_height="0.5dp"
android:layout_weight="1" >
</TextView>
</TableRow>
</TableLayout>
Cela a fonctionné. Vous êtes un ange. Merci! –