Я перепробовал все, что мог найти, чтобы выровнять этот элемент EditText вправо, но это не так.
Что мне здесь не хватает? Как видите, я безуспешно пробовал и android:layout_alignParentRight = "true"
, и android:layout_gravity="right"
.
пс. linearLayout - это всего лишь один элемент в родительском элементе с RelativeLayout, но я думаю, это не имеет значения.
<LinearLayout android:id="@+id/block1"
android:layout_width="fill_parent"
android:paddingLeft = "4sp"
android:padding = "4sp"
android:layout_height="25sp"
android:layout_marginTop = "4sp"
android:layout_below="@+id/Settings_phoneNumbersLbl"
android:orientation="horizontal">
<TextView android:id="@+id/Settings_phoneNumbersT1"
android:textColor="#000000"
android:textSize="14sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Settings_phoneNumbersT1"
/>
<EditText android:id="@+id/myRightAlignedText"
android:layout_width="170sp"
android:layout_height="wrap_content"
android:background="@android:drawable/editbox_background"
android:layout_alignParentRight = "true"
android:layout_gravity="right"
/>
</LinearLayout>