layout_gravity nicht funktioniert

Warum meine TextView geht nicht, richtig?

Update: Gut, jetzt habe ich nicht nur brauche, um TextView auf der rechten Seite. Jetzt ist es sehr interessant, warum layout_gravity funktioniert nicht wie erwartet, nämlich - gesetzt den View zu der position, die es innerhalb des übergeordneten Containers.

layout_gravity nicht funktioniert

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:minHeight="?android:attr/listPreferredItemHeight"
              style="@style/activated_item"
              android:orientation="horizontal">

    <CheckBox
        android:id="@+id/star"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginLeft="8dp"
        style="?android:attr/starStyle"/>

    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:layout_marginLeft="8dp"
        android:layout_gravity="right" //////// HERE I AM 
        android:textStyle="bold"
        android:textColor="@color/item_text_color"/>

</LinearLayout>
wo möchten Sie setzen textview bei extream Recht linearlayout? u kann nur erklären, dass
ja, ich möchte set textview ganz rechts.

InformationsquelleAutor Eugene | 2012-08-29

Schreibe einen Kommentar