I am making a application in which i want a linear layout to be displayed on top of the keyboard.When the user closes the keyboard that linear layout should also be gone. I want it something like this
Layout what i want
<?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" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" >
<RelativeLayout
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/iv_Img1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:scaleType="fitXY" />
<ImageView
android:id="@+id/iv_Img2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:scaleType="fitXY" />
</LinearLayout>
</RelativeLayout>
<ImageView
android:id="@+id/iv_Edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:padding="5dp"
android:scaleType="center"
android:src="@drawable/cam" />
</RelativeLayout>
<LinearLayout
android:id="@+id/llEditOptions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:layout_weight="0"
android:visibility="gone" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<ImageView
android:id="@+id/iv_background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="50dp"
android:layout_toLeftOf="@+id/iv_font"
android:scaleType="center"
android:src="@drawable/save_1" />
<ImageView
android:id="@+id/iv_font"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:scaleType="center"
android:src="@drawable/cam" />
<ImageView
android:id="@+id/iv_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="50dp"
android:layout_toRightOf="@+id/iv_font"
android:scaleType="center"
android:src="@drawable/share_1" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/llCamOptions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:layout_weight="0" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/iv_Save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="50dp"
android:layout_toLeftOf="@+id/iv_Camera"
android:scaleType="center"
android:src="@drawable/save_1" />
<ImageView
android:id="@+id/iv_Camera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:scaleType="center"
android:src="@drawable/cam" />
<ImageView
android:id="@+id/iv_Share"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="50dp"
android:layout_toRightOf="@+id/iv_Camera"
android:scaleType="center"
android:src="@drawable/share_1" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
This is from ios phone but can we implement this functionality in android???