0
Почему серый квадрат (transaction_amount) в следующем макете не расширяется до полного пространства, даже если макет: высота соответствует родительскому для него.TextView в относительной компоновке не расширяется, чтобы заполнить доступное пространство
<TextView android:id="@+id/transaction_amount"
android:layout_width="120dp"
android:layout_height="match_parent"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large"
android:textColor="@android:color/primary_text_light"
android:background="@drawable/rounded_rectangle"
tools:text="100"/>
<TextView
android:id="@+id/transaction_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/transaction_amount"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:textColor="@android:color/secondary_text_light"
tools:text="Mast Kalandar Dinner"/>
<TextView
android:id="@+id/shared_bw_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@id/transaction_name"
android:layout_toRightOf="@+id/transaction_amount"
android:layout_below="@id/transaction_name"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
android:textColor="@android:color/secondary_text_light_nodisable"
android:text="Shared Between"/>
<TextView
android:id="@+id/shared_bw_csv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/shared_bw_label"
android:layout_alignBaseline="@id/shared_bw_label"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
android:textColor="@android:color/secondary_text_light_nodisable"
tools:text="Ashu, Amol"/>
Попробуйте изменить высоту match_parent – CENT1PEDE
На ваш вопрос вы упомянули вы сделали «ширина» match_parent, но пустое пространство было вызвано высоты, то вы должны решить эту проблему путем изменения высоты. – CENT1PEDE
жаль, что я хотел написать layout_height. В коде layout_height соответствует match_parent –