J'essaie de mettre un bouton en haut de l'écran et en dessous un ImageView qui doit remplir l'écran (toutes les tailles d'écran). Dans RelativeLayout, ça semble facile à faire, mais dans le ConstraintLayout, je n'arrive pas à le faire.Comment remplir l'écran avec deux vues dans ConstraintLayout?
Here is an example of what it's look like in RelativeLayout:
et le code XML:
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Download Image"
android:id="@+id/button"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:onClick="downloadImage" />
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/imageView"
android:layout_below="@+id/button"
android:layout_alignParentStart="true" />
Merci pour votre aide, Shay.
Voulez-vous une image en arrière-plan et un bouton au premier plan? –