Nice question, What you can do is use PercentRelativeLayout instead of RelativeLayout
so you can adjust that 90% height, and then use this property
android:layout_alignParentTop = true
for your first LinearLayout
and
android:layout_alignParentBottom = true
for second RelativeLayout
It will stick your LinearLayouts
inside RelativeLayout
as you want.
See this questions for how to use PercentRelativeLayout here
Sample Layout here
And If you also want Layering effect as you saw in one of pic use
android:elevation property on your both `LinearLayout`.
Code taken from another answer by @Svit for full explaination
<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">
<LinearLayout
android:layout_width="match_parent"
app:layout_heightPercent="90%"
android:layout_alignParentTop="true"/>
<LinearLayout
android:layout_width="match_parent"
app:layout_heightPercent="90%"
android:layout_alignParentBottom="true"/>
</android.support.percent.PercentRelativeLayout>