package com.example.partition;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;

public class Partition extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="30dp">

    <View
        android:id="@+id/view1"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_alignParentTop="true"
        android:layout_alignParentStart="true"
        android:background="#AACCEE"/>

    <View
        android:id="@+id/view2"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_alignParentTop="true"
        android:layout_toEndOf="@id/view1"
        android:layout_marginStart="30dp"
        android:background="#FFAACC"/>

    <View
        android:id="@+id/view3"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_below="@id/view1"
        android:layout_alignParentStart="true"
        android:layout_marginTop="30dp"
        android:background="#FFAACC"/>

    <View
        android:id="@+id/view4"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_below="@id/view2"
        android:layout_toEndOf="@id/view3"
        android:layout_marginStart="30dp"
        android:layout_marginTop="30dp"
        android:background="#AACCEE"/>
</RelativeLayout>