Created
May 29, 2015 08:35
-
-
Save idanakav/3676eeaa2985801f7486 to your computer and use it in GitHub Desktop.
Percent library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout | |
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"> | |
<android.support.percent.PercentRelativeLayout | |
android:layout_height="match_parent" | |
android:layout_width="match_parent" | |
> | |
<View | |
android:id="@+id/top_left" | |
android:layout_alignParentTop="true" | |
android:layout_height="0dp" | |
android:layout_width="0dp" | |
android:background="#ff44aacc" | |
app:layout_heightPercent="20%" | |
app:layout_widthPercent="70%"/> | |
<View | |
android:id="@+id/top_right" | |
android:layout_toRightOf="@+id/top_left" | |
android:layout_alignParentTop="true" | |
android:layout_height="0dp" | |
android:layout_width="0dp" | |
android:background="#ffe40000" | |
app:layout_heightPercent="20%" | |
app:layout_widthPercent="30%"/> | |
<View | |
android:id="@+id/bottom" | |
android:layout_below="@+id/top_left" | |
android:layout_height="0dp" | |
android:layout_width="match_parent" | |
android:background="#ff00ff22" | |
app:layout_heightPercent="80%"/> | |
</android.support.percent.PercentRelativeLayout> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment