Я бы хотел, чтобы у моей радиокнопки была ширина, соответствующая экрану, и чтобы ее текст был выровнен по левой стороне экрана, а кнопка - по правой.В настоящее время мой макет выглядит следующим образом:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RadioGroup
android:id="@+id/optionsContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RadioButton
android:id="@+id/sortingOptionRadioButton"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:layoutDirection="rtl"
android:text="Popularity"
android:layout_margin="@dimen/e2_space_small"
/>
</RadioGroup>
</LinearLayout>
И в режиме предварительного просмотра он выглядит так, как я хочу, но когда я запускаю приложение на своем устройстве, текст и кнопка выравниваются по правой стороне.Как можно выровнять текст и кнопку по сторонам?