[Android Q&A, Help & Troubleshooting] android_devel:
Hello,

I have a strange problem that on some devices, like galaxy s8 and LG G6 , the default alignment is reversed.

(But on most galaxy s8 and LG G6 devices its is ok)

The default alignment for a TextView is Left but on some devices it is Right. I solved it by adding "android:layout_alignParentLeft="true"

The same is true for buttons and EditText.

But there are some more strange things with the alignment, see the screenshots below:

"alignment wrong"

[IMG="alignment wrong"]https://drive.google.com/file/d/1oiQ0g2jnOomD0mdMnrokPHWZ4GeEu4PX/view?usp=sharing[/IMG]

"alignment ok"

[IMG="alignment ok"]https://drive.google.com/file/d/1fzUhBvZi7Zp2SuNvHWgLiqPmcM6HCAv8/view?usp=sharing[/IMG]

What can cause this alignment problem, it's not the device self i think, but maybe its related to the country or language settings?

part of XML code:

<RelativeLayout
android:id="@+id/widget1"
android:background="@color/background"
android:layout_below="@+id/widget0"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_height="wrap_content"
android:layout_width="wrap_content">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="Z1"
android:layout_alignParentLeft="true"
android:id="@+id/_bandstop_filter_g0"
android:layout_alignBaseline="@+id/bandstop_filter_g0"
android:layout_marginStart="15dp"
android:layout_marginEnd="3dp" />

<EditText
android:layout_marginBottom="3dp"
android:textColor="@color/gui_text1"
android:focusable="false"
android:background="@drawable/shape_edittext_lock"
android:paddingLeft="8dp"
android:layout_height="30dp"
android:textSize="15sp"
android:inputType="numberSigned|numberDecimal"
android:id="@+id/bandstop_filter_g0"
android:layout_width="82dp"
android:layout_toRightOf="@+id/_bandstop_filter_g0"
android:layout_marginTop="5dp" />

<TextView
android:id="@+id/bandstop_filter_g0_"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/bandstop_filter_g0"
android:layout_marginStart="3dp"
android:layout_toRightOf="@+id/bandstop_filter_g0"
android:text="Ω"
android:textSize="15sp"
/>

<TextView
android:id="@+id/_bandstop_filter_2g0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/bandstop_filter_g0"
android:layout_marginStart="28dp"
android:layout_marginEnd="3dp"
android:layout_toRightOf="@+id/bandstop_filter_g0_"
android:text="Z2"
android:textSize="15sp"
/>

<EditText
android:layout_marginBottom="3dp"
android:textColor="@color/gui_text1"
android:focusable="false"
android:background="@drawable/shape_edittext_lock"
android:paddingLeft="8dp"
android:layout_height="30dp"
android:textSize="15sp"
android:inputType="numberSigned|numberDecimal"
android:id="@+id/bandstop_filter_2g0"
android:layout_width="82dp"
android:layout_toRightOf="@+id/_bandstop_filter_2g0"
android:layout_alignBaseline="@+id/bandstop_filter_g0" />

<TextView
android:id="@+id/bandstop_filter_2g0_"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/bandstop_filter_g0"
android:layout_marginStart="3dp"
android:layout_toRightOf="@+id/bandstop_filter_2g0"
android:text="Ω"
android:textColor="@color/gui_text1"
android:textSize="15sp"
/>