December 13th, 2011, 08:21 AM
|
#2 (permalink)
|
|
New Member
Join Date: Dec 2011
Location: Bournemouth
Posts: 7
Device(s): Samsung Galaxy S2, Asus EEE Transformer
Thanks: 0
Thanked 0 Times in 0 Posts
|
You can do this by using a relative layout instead of table rows. What you need to do is to put the content you want to be rendered first, in this case the buttons, at the top of the relative layout, then the content you want to fill the rest of the space at the bottom. Then for the top views you set alignbottominparent to true and it will move it to the bottom. For example:
Code:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<!--
This view needs the height to only be as big as it needs to otherwise
it fills the whole screen
-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<!-- Your top buttons here -->
</LinearLayout>
<!--
This is the view we set the align parent bottom to true, this will force
the view to be at the bottom of the screen
-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:id="@+id/container"
>
<!-- Your bottom buttons here -->
</LinearLayout>
<!-- The webview height and width will need to fill what ever space left, we need to say what content it has to be above aswell -->
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/container"
/>
</RelativeLayout>
|
|
|
Last edited by ScruffyFox; December 13th, 2011 at 11:59 AM.
|
|