Je vais essayer de faire ce court, donc j'ai créé cette application de connexion Bluetooth et tout fonctionne parfaitement dans mon téléphone mais j'ai remarqué un terrible problème quand je l'ai testé sur le téléphone de mon ami. Le problème est que j'utilise Linearlayout et deux boutons différents avec un fond d'image dessus pour chaque ligne qui se tient de côté, le cercle qui se trouve sur le côté gauche du rectangle qui est correct et c'est comme ça que ça marche sur mon téléphone, mais quand il s'agit de téléphone de mon ami qui a une langue différente (langue et entrée dans les paramètres Android) le cercle est sur le côté droit du rectangle.Problème de localisation et de différence de langue en android
S'il vous plaît noter que je sais déjà le fait que cela peut être corrigé s'il change la langue du téléphone en anglais comme le mien, mais je suis à la recherche d'une solution qui ne causerait aucun problème pour tous les types de mon pays avec deux langues de téléphone différentes.
Eh bien, comment suis-je censé résoudre ce problème?
How it looks on my friend's phone
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="@dimen/activity_vertical_margin">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="200dp">
<Button
android:layout_width="75dp"
android:layout_height="70dp"
android:id="@+id/circle1"
android:background="@drawable/redcircle />
<Button
android:layout_width="75dp"
android:layout_height="70dp"
android:id="@+id/greenCircle"
android:background="@drawable/greencircle"
android:alpha="0"/>
</FrameLayout>
<Button
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="5dp"
android:id="@+id/rect1"
android:text="Bluetooth Turn On/Off"
android:textStyle="italic"
android:textColor="#fdfdfd"
android:background="@drawable/rects"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_weight="1.4"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:layout_width="150dp"
android:layout_height="70dp"
android:id="@+id/circle2"
android:background="@drawable/gomb"
android:layout_weight="1" />
<Button
android:layout_width="match_parent"
android:layout_height="60dp"
android:id="@+id/rect2"
android:textStyle="italic"
android:text="View paired Devices"
android:textColor="#fdfdfd"
android:enabled="false"
android:background="@drawable/rects"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.9">
<Button
android:layout_width="150dp"
android:layout_height="70dp"
android:id="@+id/circle3"
android:background="@drawable/gomb"
android:layout_weight="1" />
<Button
android:layout_width="match_parent"
android:layout_height="60dp"
android:id="@+id/rect3"
android:textStyle="italic"
android:textColor="#fdfdfd"
android:enabled="false"
android:text="Scan for new Devices"
android:background="@drawable/rects"
android:layout_weight="1" />
</LinearLayout>