tutorial2_display.xml 1.77 KB
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

<LinearLayout
    android:id="@+id/ts2l1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:orientation="vertical">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:textSize="15sp"
        android:text="Fais glisser le rectangle bleu sur le rectangle rouge." />

    <ImageView
        android:id="@+id/blue_rectangle"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_margin="50dp"
        android:background="@drawable/blue_rectangle"/>

</LinearLayout>

    <RelativeLayout
        android:id="@+id/ts2r1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/ts2l1"
        android:orientation="vertical">

        <ImageView
            android:id="@+id/red_rectangle"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:layout_centerInParent="true"
            android:background="@drawable/red_rectangle" />

        <Button
            android:id="@+id/button_id_home"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentLeft="true"
            android:layout_margin="5dp"
            android:onClick="backHome"
            android:text="@string/home" />

    </RelativeLayout>

</RelativeLayout>