I am working on an Android application and I use it as a FrameLayout view. The problem is design. Inside the view, I have another FrameLayout and LinearLayout, which is located in the bottom view. But the problem is that when my FrameLayout is higher than the parent, the last part of FrameLayout is under LinearLayout, in which case I want my view from FrameLayout to occupy the entire part, less than the height of LinearLayout.
Here is a screenshot:

And here is my code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
<LinearLayout
android:id="@+id/bottom_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="bottom"
android:background="@drawable/menu_background"
android:paddingTop="8dp" >
<TextView
android:id="@+id/currentOffersMenu"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="1"
android:drawableTop="@drawable/products"
android:drawablePadding="4dp"
android:gravity="center"
android:textColor="@android:color/black"
android:textSize="@dimen/bottom_menu_text_size" />
<TextView
android:id="@+id/receiptStatusMenu"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginTop="16dp"
android:layout_weight="1"
android:drawableTop="@drawable/receipt"
android:drawablePadding="4dp"
android:gravity="center"
android:textColor="@android:color/black"
android:textSize="@dimen/bottom_menu_text_size" />
<TextView
android:id="@+id/photographReceiptMenu"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="1"
android:drawableTop="@drawable/camera"
android:drawablePadding="4dp"
android:gravity="center"
android:textColor="@android:color/black"
android:textSize="@dimen/bottom_menu_text_size"
android:layout_marginTop="20dp" />
<TextView
android:id="@+id/userAccountMenu"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="1"
android:drawableTop="@drawable/account"
android:drawablePadding="4dp"
android:gravity="center"
android:textColor="@android:color/black"
android:textSize="@dimen/bottom_menu_text_size" />
<TextView
android:id="@+id/howItWorksMenu"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="1"
android:drawableTop="@drawable/information"
android:drawablePadding="4dp"
android:gravity="center"
android:textColor="@android:color/black"
android:textSize="@dimen/bottom_menu_text_size" />
</LinearLayout>
Can anyone help me out?
source
share