Я только начинаю с разработки Android и стараюсь изучить тонкости всего. Я пытаюсь создать представление, что-то вроде $________
(знак доллара, за которым следует текстовое поле), но я не могу заставить LinearLayout работать правильно (я представляю, что он работает так же, как StackPanel XAML?).Расположение LinearLayout в android
Вот что я получил:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="75dp">
<TextView android:text="$"
android:textSize="65dp"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<EditText android:layout_width="150dp"
android:layout_height="match_parent"/>
</LinearLayout>
</LinearLayout>
Но только знак доллара показывает вверх. Если я включаю его таким:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="75dp">
<EditText android:layout_width="150dp"
android:layout_height="match_parent"/>
<TextView android:text="$"
android:textSize="65dp"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
</LinearLayout>
тогда он показывает, как я бы ожидать: _________$
, а наоборот, кажется, не работает хорошо. Любая помощь очень ценится!