Bonjour, j'ai des problèmes avec l'image ci-dessous. Comme vous pouvez le voir, les rangées de tables prennent tellement d'espace et je voudrais les réduire car il y a d'autres widgets de vue sous eux. Comment puis-je atteindre cet objectif? Je vous remercie.TableRow prendre plus d'espace que d'habitude android TableLayout
ceci est mon xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="3"
android:padding="8dp"
android:background="@drawable/rounded_date_filter">
<TableRow
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/datefilter_text_from_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_weight="1"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="@string/from_text">
</TextView>
<TextView
android:id="@+id/datefilter_text_to_id"
android:layout_width="10dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="40dp"
android:layout_marginTop="10dp"
android:text="01-01-2012">
</TextView>
</TableRow>
<View
android:layout_width="fill_parent"
android:layout_height="1px"
android:background="#606060">
</View>
<TableRow>
<TextView
android:id="@+id/datefilter_text_from_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_weight="1"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="@string/to_text">
</TextView>
<TextView
android:id="@+id/datefilter_text_to_id"
android:layout_width="10dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="40dp"
android:layout_marginTop="10dp"
android:text="01-09-2012">
</TextView>
</TableRow>
<View
android:layout_width="fill_parent"
android:layout_height="1px"
android:background="#606060">
</View>
<TableRow>
<TextView
android:id="@+id/datefilter_text_from_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_weight="1"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="@string/groupby">
</TextView>
<TextView
android:id="@+id/datefilter_text_to_id"
android:layout_width="10dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="40dp"
android:layout_marginTop="10dp"
android:text="day">
</TextView>
</TableRow>
</TableLayout>
<Button
android:id="@+id/reset_filter_button_id"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/reset_filters">
</Button>
</LinearLayout>
Retirez le poids de mise en page de la 'TableRows'. – Luksprog
@Luksprog désolé pour la réponse tardive. J'ai fait cela mais cela n'aide pas – irobotxxx