2016-04-10 10 views
0

Ich habe dieses LinearLayout und in ihm ist ein Map Fragment und das alles funktioniert, aber ich kann nicht das lineare Layout aus irgendeinem Grund an den unteren Rand des Bildschirms ausrichten. Hier ist meine xml:Android Align LinearLayout unten funktioniert nicht

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical" 
    tools:context=".MainActivity" 
    android:baselineAligned="false" 
    android:weightSum="1" 
    android:background="@mipmap/background_colour"> 

    <LinearLayout 
     android:orientation="vertical" 
     android:layout_width="30dp" 
     android:layout_height="31dp" 
     android:weightSum="1" 
     android:id="@+id/back_button" 
     android:background="@drawable/navigation_back" 
     android:layout_marginTop="20dp" 
     android:layout_marginLeft="10dp"> 

    </LinearLayout> 

    <LinearLayout 
     android:orientation="horizontal" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_weight="0.31"> 

     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textAppearance="?android:attr/textAppearanceLarge" 
      android:text="Large Text" 
      android:id="@+id/textView7" /> 
    </LinearLayout> 

    <LinearLayout 
     android:orientation="horizontal" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_weight="0.30"> 

     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textAppearance="?android:attr/textAppearanceLarge" 
      android:text="Large Text" 
      android:id="@+id/textView6" /> 
    </LinearLayout> 

    <LinearLayout 
     android:id="@+id/lay" 
     android:orientation="horizontal" 
     android:layout_width="match_parent" 
     android:layout_alignParentBottom="true" 
     android:layout_height="wrap_content" 
     android:layout_weight="3.5"> 



    </LinearLayout> 
    </LinearLayout> 

Das Linearlayout ich auszurichten versuche ist die ID: „Laien“ ein.

Antwort

0

fand ich eine fix:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical" 
    tools:context=".MainActivity" 
    android:baselineAligned="false" 
    android:weightSum="1" 
    android:background="@mipmap/background_colour"> 

    <LinearLayout 
     android:orientation="vertical" 
     android:layout_width="30dp" 
     android:layout_height="31dp" 
     android:weightSum="1" 
     android:id="@+id/back_button" 
     android:background="@drawable/navigation_back" 
     android:layout_marginTop="20dp" 
     android:layout_marginLeft="10dp"> 

    </LinearLayout> 

    <LinearLayout 
     android:orientation="horizontal" 
     android:layout_width="match_parent" 
     android:layout_height="177dp"> 

     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textAppearance="?android:attr/textAppearanceLarge" 
      android:text="Large Text" 
      android:id="@+id/textView7" /> 
    </LinearLayout> 

    <LinearLayout 
     android:orientation="horizontal" 
     android:layout_width="match_parent" 
     android:layout_height="146dp"> 

     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textAppearance="?android:attr/textAppearanceLarge" 
      android:text="Large Text" 
      android:id="@+id/textView6" /> 
    </LinearLayout> 

    <LinearLayout 
     android:id="@+id/lay" 
     android:orientation="horizontal" 
     android:layout_width="match_parent" 
     android:layout_alignParentBottom="true" 
     android:layout_height="match_parent"> 



</LinearLayout> 
</LinearLayout>