Sechs ImageViews auf den gesamten Bildschirm verteilen

  • Antworten:1
  • Bentwortet
Ka Li
  • Forum-Beiträge: 3

07.06.2014, 14:12:38 via Website

Hallo,

ich habe mir sehr viele Gedanken darüber gemacht, wie ich es denn wohl hinbekomme folgendes Layout zu erzielen:

X X
X X
X X

Hier ein Bild zur Veranschaulichung meiner Arbeit.

image

Soweit so gut. Allerdings, wollen wir ehrlich sein, sieht das Schei*e. Ich hätte gerne die Bilder über den gesamten Bildschirm. In der breite, füllen sie ja bereits den Bildschirm, allerdings nicht in der Höhe. Ich hoffe ihr versteht mein Problem soweit.

Würde mich sehr freuen, wenn mir da jemand weiterhelfen könnte (:

Antworten
Ka Li
  • Forum-Beiträge: 3

07.06.2014, 14:49:19 via Website

android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"  
    android:layout_weight="1" >

    <ImageView
        android:id="@+id/button1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:src="@drawable/ic_launcher"
        android:layout_weight="1"
        android:text="Button" />

    <ImageView
        android:id="@+id/button2"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:src="@drawable/ic_launcher"
        android:layout_weight="1"
        android:text="Button" />

</LinearLayout>

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" 
    android:layout_weight="1" >

    <ImageView
        android:id="@+id/button3"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:src="@drawable/ic_launcher"
        android:layout_weight="1"
        android:text="Button" />

    <ImageView
        android:id="@+id/button4"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:src="@drawable/ic_launcher"
         android:layout_weight="1"
        android:text="Button" />

</LinearLayout>

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1" >

    <ImageView
        android:id="@+id/button5"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:src="@drawable/ic_launcher"
         android:layout_weight="1"
        android:text="Button" />

    <ImageView
        android:id="@+id/button6"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:src="@drawable/ic_launcher"
        android:layout_weight="1"
        android:text="Button" />

</LinearLayout>

</LinearLayout>

Hier ist die Lösung des Problems!

Antworten