Ciao Rafael
Ich habe das Layout auch als TableLayout erstellt. Trotzdem werden die Spalten nicht gleich breit.
<?xml version="1.0" encoding="utf-8"?>
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/lay_festtage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layoutDescription="@xml/activity_fest_tags_kalender_scene"
tools:context=".FestTagsKalender">
<TableLayout
android:id="@+id/lay_tab"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TableRow
android:id="@+id/tab_eins"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/txt_neujahr"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_neujahr"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_neujahr_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_zwei"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_konig"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_konig"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_konig_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_drei"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_asche"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_asche"
android:textColor="@android:color/holo_purple" />
<TextView
android:id="@+id/txt_asche_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_vier"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start" >
<TextView
android:id="@+id/txt_palm"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_palm"
android:textColor="@android:color/holo_red_dark" />
<TextView
android:id="@+id/txt_palm_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_fuenf"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_grund"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_gruend"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_gruend_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_sechs"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_karrfrei"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_karrfrei"
android:textColor="@android:color/holo_red_dark" />
<TextView
android:id="@+id/txt_karrfrei_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_sieben"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_osternacht"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_osternacht"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_osternacht_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_acht"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/txt_ostern"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_ostern"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_ostern_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_neun"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/txt_osterm"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_osterm"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_osterm_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_zehn"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_pfingst"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_pfingst"
android:textColor="@android:color/holo_red_dark" />
<TextView
android:id="@+id/txt_pfingst_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_elf"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_pfingstm"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_pingstm"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_pfingstm_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_zwoelf"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_allerh"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_allerh"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_allerh_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_dreizehn"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_allers"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_allers"
android:textColor="@android:color/holo_purple" />
<TextView
android:id="@+id/txt_allers_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_vierzehn"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_hilabend"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_heilabend"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_heilabend_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_fuenfzehn"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_weihnacht"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_weihnacht"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_wehinacht_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_sechzehn"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_stefan"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_stefan"
android:textColor="@android:color/holo_red_dark" />
<TextView
android:id="@+id/txt_stefan_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
<TableRow
android:id="@+id/tab_siebzehn"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txt_silber"
style="@style/LabelTetel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@android:color/black"
android:text="@string/lbl_silber"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_silber_dat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1" />
</TableRow>
</TableLayout>
Oder muss ich noch was ändern?
Gruss Renato
Empfohlener redaktioneller Inhalt
Mit Deiner Zustimmung wird hier ein externer Inhalt geladen.
Mit Klick auf den oben stehenden Button erklärst Du Dich damit einverstanden, dass Dir externe Inhalte angezeigt werden dürfen. Dabei können personenbezogene Daten an Drittanbieter übermittelt werden. Mehr Infos dazu findest Du in unserer Datenschutzerklärung.