Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0125b83 authored by Fan Zhang's avatar Fan Zhang
Browse files

Fix text alignment with rtl languages in entity header.

TextViews should align at viewStart to make numerics like version
number display in RTL format.

Also cleaned up style so we can share the same style on all entity
header textviews.

Change-Id: I25a93d33e9fb95a9eba7b368438cb33bb67a434a
Fixes: 78173905
Test: visual
parent 1257466d
Loading
Loading
Loading
Loading
+6 −19
Original line number Diff line number Diff line
@@ -62,35 +62,22 @@

            <TextView
                android:id="@+id/install_type"
                style="@style/TextAppearance.EntityHeaderSummary"
                android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="start"
                android:singleLine="true"
                android:ellipsize="marquee"
                android:textAppearance="@android:style/TextAppearance.Material.Body1"
                android:textColor="?android:attr/textColorSecondary" />
                android:layout_height="wrap_content"/>

            <TextView
                android:id="@+id/entity_header_summary"
                style="@style/TextAppearance.EntityHeaderSummary"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="start"
                android:singleLine="true"
                android:ellipsize="marquee"
                android:textAppearance="@android:style/TextAppearance.Material.Body1"
                android:textColor="?android:attr/textColorSecondary" />
                android:layout_height="wrap_content" />

            <TextView
                android:id="@+id/entity_header_second_summary"
                style="@style/TextAppearance.EntityHeaderSummary"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="start"
                android:singleLine="true"
                android:ellipsize="marquee"
                android:textAlignment="viewStart"
                android:textAppearance="@android:style/TextAppearance.Material.Body1"
                android:textColor="?android:attr/textColorSecondary" />
                android:layout_height="wrap_content" />

        </LinearLayout>
    </LinearLayout>
+6 −20
Original line number Diff line number Diff line
@@ -55,36 +55,22 @@

        <TextView
            android:id="@+id/install_type"
            style="@style/TextAppearance.EntityHeaderSummary"
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="start"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:textAppearance="@android:style/TextAppearance.Material.Body1"
            android:textColor="?android:attr/textColorSecondary" />
            android:layout_height="wrap_content" />

        <TextView
            android:id="@+id/entity_header_summary"
            style="@style/TextAppearance.EntityHeaderSummary"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="start"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:textAlignment="viewStart"
            android:textAppearance="@android:style/TextAppearance.Material.Body1"
            android:textColor="?android:attr/textColorSecondary" />
            android:layout_height="wrap_content" />

        <TextView
            android:id="@+id/entity_header_second_summary"
            style="@style/TextAppearance.EntityHeaderSummary"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="start"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:textAlignment="viewStart"
            android:textAppearance="@android:style/TextAppearance.Material.Body1"
            android:textColor="?android:attr/textColorSecondary" />
            android:layout_height="wrap_content" />

    </LinearLayout>

+9 −0
Original line number Diff line number Diff line
@@ -423,6 +423,15 @@
        <item name="android:textSize">16sp</item>
    </style>

    <style name="TextAppearance.EntityHeaderSummary"
           parent="@android:style/TextAppearance.Material.Body1">
        <item name="android:textAlignment">viewStart</item>
        <item name="android:textColor">?android:attr/textColorSecondary</item>
        <item name="android:gravity">start</item>
        <item name="android:singleLine">true</item>
        <item name="android:ellipsize">marquee</item>
    </style>

    <style name="ActionPrimaryButton" parent="android:Widget.DeviceDefault.Button.Colored"/>

    <style name="ActionSecondaryButton" parent="android:Widget.DeviceDefault.Button"/>