Android relative layout center vertikal mit Rand

in Android RelativeLayout können wir textView genau in der Mitte des Bildschirms mit diesem code:

<TextView
    android:text="This is TextView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerVertical="true"
    android:layout_centerHorizontal="true" />

Ergebnis:

top
-
-
-
-
This is TextView (center vertical)
-
-
-
-
bottom

Aber ich muss die textView noch ein bisschen nach unten, ich versuche, fügen Sie marginTop aber scheint, wie nach der Verwendung von layout_centerVertical=true seine unmöglich geworden. Jede Lösung?

Erwartete Ergebnis (ein bisschen nach unten):

top
-
-
-
-
-
-
This is TextView (center vertical slight to bottom)
-
-
bottom
gute Frage, vielen Dank

InformationsquelleAutor Abraham Putra Prakasa | 2014-11-17

Schreibe einen Kommentar