Ich versuche, eine Schaltfläche am oberen Rand des Bildschirms und darunter ein ImageView, die den Bildschirm (alle Bildschirmgrößen) füllen müssen. In RelativeLayout scheint es einfach zu sein, aber im ConstraintLayout gelingt mir das nicht.Wie füllt man den Bildschirm mit zwei View in ConstraintLayout?
Here is an example of what it's look like in RelativeLayout:
und die XML-Code:
<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" />
Danke für Ihre Hilfe, Shay.
Möchten Sie Bild als Hintergrund und Schaltfläche im Vordergrund? –