Почему layout_below не работает одинаково в разных ситуациях? - PullRequest
0 голосов
/ 25 ноября 2018

Я хотел знать, почему моя кнопка заполняет все относительное расположение, когда я пишу layout_below.А также как это исправить.

Это моя первая кнопка, которая хорошо работает:

<Button
        android:id="@+id/boton_menu"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="15dp"
        android:layout_marginLeft="70dp"
        android:layout_marginBottom="15dp"
        android:layout_above="@+id/boton_cambiarmenu"
        android:layout_below="@+id/cuttingboard"
        android:background="@drawable/boton_redondo"
        android:text="@string/Menú_hoy"
        android:textAllCaps="false"
        android:textSize="40sp"
        app:fontFamily="@font/san_francisco_display_regular" />

enter image description here

иэто тот, который заполняет весь экран:

<Button
        android:id="@+id/boton_platos"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="15dp"
        android:layout_marginLeft="70dp"
        android:layout_marginBottom="15dp"
        android:layout_below="@+id/boton_cambiarmenu"
        android:background="@drawable/boton_redondo"
        android:text="@string/Platos"
        android:textAllCaps="false"
        android:textSize="40sp"
        app:fontFamily="@font/san_francisco_display_regular"/>

enter image description here

Пожалуйста, я хотел бы знать, почему вторая кнопка вместо этого заполняет все относительное расположение вместопервого.

Спасибо

...