Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?xml version="1.0" encoding="utf-8"?>
<android.support.percent.PercentRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.example.opi.blog.MainActivity">
<Button
android:background="@android:color/holo_red_dark"
app:layout_widthPercent="50%"
app:layout_heightPercent="50%" />
<Button
android:layout_alignParentRight="true"
android:background="@android:color/holo_green_dark"
app:layout_widthPercent="50%"
app:layout_heightPercent="50%" />
<Button
android:layout_alignParentBottom="true"
app:layout_widthPercent="50%"
android:background="@android:color/holo_blue_dark"
app:layout_heightPercent="50%" />
<Button
android:layout_alignParentBottom="true"
android:background="@android:color/white"
android:layout_alignParentRight="true"
app:layout_widthPercent="50%"
app:layout_heightPercent="50%" />
</android.support.percent.PercentRelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.