The percent support library is what you need.
This library is pretty easy to use, since it's the same RelativeLayout and FrameLayout that we are familiar with, just with some extra features.
First of all, since the Percent Support Library comes with Android Support Library 23, please make sure that you update the Android Support Library in the SDK Manager to the latest version. Then add the dependency as shown below in the build.gradle file:
compile 'com.android.support:percent:23.0.0'
Now back to your Question, you can do something similar to achieve your result. Hope this helps you.
<?xml version="1.0" encoding="utf-8"?> <android.support.percent.PercentRelativeLayout 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/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:background="@drawable/bird" android:text="Your text" app:layout_heightPercent="33%" app:layout_widthPercent="33%" /> </android.support.percent.PercentRelativeLayout>
source share