2016-07-01 19 views
-7

enter image description hereRechteck am Ende der Aktivität

Versuchen, Android Studio zu studieren. Wie kann ich ein unteres Rechteck mit "Login" -Text erstellen? Und dumme Frage zu Tabs. Stimmt das, dass ich sie mit der Eigenschaft marginTop verschiebe?

+0

Sie einen 'LinearLayout' mit dem' textview' erstellen können mit 'Schweren Left' Eigenschaft auf der' TextView' Element – Aspicas

+0

Verwendung 'android: layout_alignParentBottom = "true"' zu Halten Sie das Layout an der Unterseite –

+0

Danke! Aber genau um Rechteck zu zeichnen? Einziehbar? –

Antwort

1

verwenden, die Layout:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
       android:orientation="vertical" android:layout_width="match_parent" 
       android:layout_height="match_parent"> 

    <LinearLayout 
     android:orientation="vertical" 
     android:layout_width="match_parent" 
     android:layout_height="0dp" 
     android:layout_weight="0.90"> 

    </LinearLayout> 

    <LinearLayout 
     android:orientation="vertical" 
     android:layout_width="match_parent" 
     android:layout_height="0dp" 
     android:layout_weight="0.10" 
     android:background="#ffFF9800" 
     android:layout_gravity="center_vertical"> 

     <LinearLayout 
      android:orientation="horizontal" 
      android:layout_width="wrap_content" 
      android:layout_height="match_parent" 
      android:layout_gravity="right" 
      android:layout_marginRight="20dp"> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="LOG IN >" 
       android:id="@+id/textView76" 
       android:textSize="20sp" 
       android:textColor="#fff" 
       android:layout_gravity="center_vertical"/> 
     </LinearLayout> 
    </LinearLayout> 


</LinearLayout> 
+0

Vielen Dank @Aspicas! Es ist am unteren Rand, aber scheint etwas schief gegangen https://pp.vk.me/c636924/v636924257/1398e/K2_XcDPPPeQ.jpg. Oder wollen wir das? Sorry :( –

+0

@VladislavDmitriev Sorry ... Was ist das Problem? Farbe? Ich kann kein Problem sehen – Aspicas

+0

Sorry, es war meine Schuld. Jetzt ist es Arbeit perfekt :) –