Created
June 20, 2012 04:31
-
-
Save joshdholtz/2958133 to your computer and use it in GitHub Desktop.
Android - flex space between views
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:orientation="vertical" > | |
<LinearLayout android:id="@+id/activity_webview_toolbar" | |
android:layout_width="fill_parent" | |
android:layout_height="50dp" | |
android:orientation="horizontal" | |
android:layout_alignParentBottom="true" | |
android:background="#FF0000"> | |
<Button android:id="@+id/activity_webview_btn_back" | |
android:layout_width="30dp" | |
android:layout_height="30dp" | |
android:layout_margin="10dp" | |
android:background="@drawable/circle_west" /> | |
<!-- This view with weight 1 as a flex space to evenly space out other views --> | |
<View android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_weight="1" /> | |
<Button android:id="@+id/activity_webview_btn_refresh" | |
android:layout_width="30dp" | |
android:layout_height="30dp" | |
android:layout_margin="10dp" | |
android:background="@drawable/refresh" /> | |
<!-- This view with weight 1 as a flex space to evenly space out other views --> | |
<View android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_weight="1" /> | |
<Button android:id="@+id/activity_webview_btn_forward" | |
android:layout_width="30dp" | |
android:layout_height="30dp" | |
android:layout_margin="10dp" | |
android:background="@drawable/circle_east" /> | |
</LinearLayout> | |
<WebView android:id="@+id/activity_webview_webview" | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:layout_alignParentTop="true" | |
android:layout_above="@id/activity_webview_toolbar"/> | |
</RelativeLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment