java - Trouble with text alignment on HUAWEI Devices -
i have trouble text alignment on huawei devices. text widgets have right text alignment (with android:gravity="start")
application tag:
<application android:supportsrtl="true" android:theme="@style/apptheme" android:allowbackup="true" android:name=".shopapplication" android:icon="@drawable/ic_launcher" android:label="@string/app_name" />
and textview xml (for example)
<textview android:id="@+id/tv_value" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="start" android:text="23.000.000.097" android:textcolor="@color/background" android:textsize="30sp"/>
application theme:
<style name="apptheme" parent="theme.appcompat.light.noactionbar"> <!-- customize theme here. --> <item name="colorprimary">@color/primary_text_color</item> <item name="colorprimarydark">@color/background</item> <item name="coloraccent">@color/accent_red_color</item> <item name="colorcontrolnormal">@android:color/white</item> </style>
when set gravity end - text appears on left side of textview
.
1 - textview android:layout_width="match_parent" , android:gravity="end", 2 - textview wrap_content
maybe know how fix it?
i want have standart start - left / end - right gravity
thx!
solution founded! huawei have strange behaviour, when set default locale (it enabled force rtl) when set language locale (us,ru,zh,etc), instead of "default" - rtl disabled
Comments
Post a Comment