<?xml version="1.0" encoding="utf-8"?>
<android.support.percent.PercentFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <Button
        android:id="@+id/button1"
        android:text="Button 1"
        android:gravity="left|top"
        app:layout_widthPercent = "50%"
        app:layout_heightPercent = "50%"
        android:layout_gravity="left|top"/>
    <Button
        android:id="@+id/button2"
        android:text="Button 2"
        android:gravity="right|top"
        app:layout_widthPercent = "50%"
        app:layout_heightPercent = "50%"
        android:layout_gravity="right|top"/>
    <Button
        android:id="@+id/button3"
        android:text="Button 3"
        android:gravity="left|bottom"
        app:layout_widthPercent = "50%"
        app:layout_heightPercent = "50%"
        android:layout_gravity="left|bottom"/>
    <Button
        android:id="@+id/button4"
        android:text="Button 4"
        android:gravity="right|bottom"
        app:layout_widthPercent = "50%"
        app:layout_heightPercent = "50%"
        android:layout_gravity="right|bottom"/>

</android.support.percent.PercentFrameLayout>