Hallo,
ich möchte eine eigene ListView gestalten. Dabei soll eine Zeile so aussehen:
Wie erstelle ich so ein Layout am besten? Soll ich ein GridLayout oder ein TableLayout benutzen? Ich weiß irgendwie nicht weiter. Kann mir jemand helfen?
Danke
Hallo,
ich möchte eine eigene ListView gestalten. Dabei soll eine Zeile so aussehen:
Wie erstelle ich so ein Layout am besten? Soll ich ein GridLayout oder ein TableLayout benutzen? Ich weiß irgendwie nicht weiter. Kann mir jemand helfen?
Danke
08.06.2014, 12:32:46 via App
08.06.2014 12:32:46 via App
Mit einem Listfragment würde das gehen
Ich sammle gerne Namen in meinem Death Note.
Samsung Galaxy Note 2 -> Samsung Galaxy Note 3
Könntest Du deine Antwort etwas genauer beschreiben? Was hat ein Fragement damit zu tun? Ich versuche eine ListView-Zeile zu gestalten. Das Layout übergebe ich dann meinem Adapter.
Danke
08.06.2014, 13:56:20 via App
08.06.2014 13:56:20 via App
Hab mich etwas falsch ausgedrückt. Hatte an dieses Prinzip gedacht.
http://www.directupload.net/file/d/3647/j4m6beof_png.htm
http://www.directupload.net/file/d/3647/khi9ih3a_png.htm
Ich sammle gerne Namen in meinem Death Note.
Samsung Galaxy Note 2 -> Samsung Galaxy Note 3
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView android:layout_width="wrap_content"
android:src="@android:drawable/btn_star"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_width="wrap_content"
android:orientation="vertical"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:text="row 1, col1"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:text="row 2, col1"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:orientation="vertical"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:text="row 1, col2"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:text="row 2, col2"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
— geändert am 08.06.2014, 15:13:18