Occupy split the friend screen
Here you would define "weights" with the layout_weight property in your view, assuming the following example, in which we need that our bottom view always occupies 50% of the screen and is positioned at the bottom, but we also need add another 2 views, one occupying 30% of the screen and the second 20%.
If we take into account the total of the screen as 1, we assign a value of .50 so that it always occupies 50% of the screen our view:
<WebView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".50"
android:id="@+id/webView"
android:layout_alignParentBottom="true" />
and so with the other views, one will occupy 30% (we assign .30) and the other 20% (we assign .20):
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".30"
android:text="Vista 1" />
<Button
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".20"
android:text="Vista 2" />
<WebView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".50"
android:id="@+id/webView"
android:layout_alignParentBottom="true" />
</LinearLayout>
We can ensure that the views will have the percentage specified on the screen and you decide where to get the result.
I hope my palomita friend: D