I've made an XML which include a TextView
having a textAlignement:center
in the following code :
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="1">
<Button
android:layout_width="0px"
android:layout_weight="0.24"
android:text="gestion"
android:layout_height="wrap_content"
android:id="@+id/GoGestion"/>
<View
android:layout_width="0px"
android:layout_weight="0.01"
android:layout_height="match_parent"></View>
<TextView
android:layout_width="0px"
android:layout_weight="0.5"
android:layout_height="wrap_content"
android:text="Creation Sav"
android:textSize="40dp"
android:layout_gravity="center"
android:textAlignment="center"/>
<View
android:layout_width="0px"
android:layout_weight="0.01"
android:layout_height="match_parent"></View>
<Button
android:layout_width="0px"
android:layout_weight="0.24"
android:text="Archive"
android:layout_height="wrap_content"
android:id="@+id/GoArchive"/>
</LinearLayout>
And the fact is that My textView isn't centered on a tablet having 4.1.2 version (jellybean) but is on the other tablet 4.4.2 (kitkat).
My app compiles with minSdkVersion 15
so jellybean is more recent. Nowhere in the doc is specified that Jellybean does not run textAlignement.
Why is it not working on jelylbean and how can I fix this?