2016-10-23 3 views

Antwort

0

Sie können das gewünschte Ergebnis mit Android TableLayout erreichen.

Here ist der Entwickler Link für Tablelayout

0

einige Male Raster-Layout ist keine Antwort. versuchen, 3 linear Layout übereinander wie dies seine einfache

<LinearLayout 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_height="match_parent" 
android:layout_width="match_parent" 
android:orientation="vertical" 
android:background="#000000"> 

<Button 
    android:layout_height="60dp" 
    android:layout_width="match_parent" 
    android:background="@drawable/icon_you_should_know" 
    android:maxWidth="360dp"/> 

<LinearLayout 
    android:layout_height="120dp" 
    android:layout_width="match_parent" 
    android:orientation="horizontal" 
    android:gravity="top|center"> 

    <Button 
     android:layout_height="match_parent" 
     android:layout_width="wrap_content" 
     android:layout_weight="1.0" 
     android:maxWidth="120dp" 
     android:background="@drawable/icon_wounded_demon"/> 

    <Button 
     android:layout_height="match_parent" 
     android:layout_width="wrap_content" 
     android:layout_weight="1.0" 
     android:maxWidth="120dp" 
     android:background="@drawable/icon_maze_desert"/> 

    <Button 
     android:layout_height="match_parent" 
     android:layout_width="wrap_content" 
     android:layout_weight="1.0" 
     android:maxWidth="120dp" 
     android:background="@drawable/icon_working_with_darkness"/> 

</LinearLayout> 

<LinearLayout 
    android:layout_height="120dp" 
    android:layout_width="match_parent" 
    android:orientation="horizontal" 
    android:gravity="top|center"> 

    <Button 
     android:layout_height="match_parent" 
     android:layout_width="wrap_content" 
     android:layout_weight="1.0" 
     android:maxWidth="120dp" 
     android:background="@drawable/icon_weak_spot"/> 

    <Button 
     android:layout_height="match_parent" 
     android:layout_width="wrap_content" 
     android:layout_weight="1.0" 
     android:maxWidth="120dp" 
     android:background="@drawable/icon_none"/> 

    <Button 
     android:layout_height="match_parent" 
     android:layout_width="wrap_content" 
     android:layout_weight="1.0" 
     android:maxWidth="120dp" 
     android:background="@drawable/icon_none"/> 

</LinearLayout> 

<LinearLayout 
    android:layout_height="120dp" 
    android:layout_width="match_parent" 
    android:orientation="horizontal" 
    android:gravity="top|center"> 

    <Button 
     android:layout_height="match_parent" 
     android:layout_width="wrap_content" 
     android:layout_weight="1.0" 
     android:maxWidth="120dp" 
     android:background="@drawable/icon_none"/> 

    <Button 
     android:layout_height="match_parent" 
     android:layout_width="wrap_content" 
     android:layout_weight="1.0" 
     android:maxWidth="120dp" 
     android:background="@drawable/icon_none"/> 

    <Button 
     android:layout_height="match_parent" 
     android:layout_width="wrap_content" 
     android:layout_weight="1.0" 
     android:maxWidth="120dp" 
     android:background="@drawable/icon_none"/> 

</LinearLayout> 

auch u max Breite und Höhe jeder Zeile mit und vergessen Sie nicht, einen Knopf entfernen oder hinzufügen können layout_weight = „1“ seine Werke hinzufügen Ich hoffe, es funktioniert für dich.

und für die Ränder könnten Sie Bild in einem größeren Bild ohne Hintergrund im PNG-Format setzen.

Verwandte Themen