Part of my layout goes upward with keyboard

Posted by Burak Dede on Stack Overflow See other posts from Stack Overflow or by Burak Dede
Published on 2010-12-24T14:29:43Z Indexed on 2010/12/24 15:53 UTC
Read the original article Hit count: 523

Filed under:
|
|

My android app have a layout like this when i open keyboard two imageview at the bottom of the page shows up over the keyboard , i couldnt see the problem why it goes upward with the keyboard can you help me about this ?

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >

    <LinearLayout
        android:id="@+id/searchLinear"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@color/upperbackground">

           <EditText
            android:id="@+id/searchBox"
            android:layout_alignParentTop="true"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:layout_margin="12dip"
            android:paddingLeft="35dip"
            android:textSize="15sp"
            android:background="@drawable/search_bar"/>

    </LinearLayout>

    <LinearLayout
            android:id="@+id/searchButtons"
            android:layout_below="@id/searchLinear"
            android:orientation="horizontal"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical|center_horizontal"
            android:background="@color/upperbackground">    

        <ImageView
            android:id="@+id/btnSukela"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:clickable="true"
            android:focusable="true"
            android:onClick="sukelaClickEvent"
            android:paddingRight="8dip"
            android:paddingBottom="5dip"
            android:src="@drawable/sukela"/>

        <ImageView
            android:id="@+id/btnSearch"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/btnSukela"
            android:clickable="true"
            android:focusable="true"
            android:onClick="searchEntryClickEvent"
            android:paddingLeft="8dip"
            android:paddingBottom="5dip"
            android:src="@drawable/search"/>

    </LinearLayout>

    <RelativeLayout
        android:id="@+id/bottomLinear"
        android:layout_alignParentBottom="true"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical|center_horizontal"
        android:background="@drawable/bottom_back">     

        <ImageView  
            android:id="@+id/btnToday"
            android:src="@drawable/today"
            android:background="@color/bottombackground"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignBottom="@+id/bottomLinear"
            android:layout_marginBottom="19dip"
            android:layout_centerVertical="true"
            android:clickable="true"
            android:focusable="true"
            android:onClick="todayClickEvent"/> 

        <ImageView  
            android:id="@+id/btnPopular"
            android:src="@drawable/popular"
            android:background="@color/bottombackground"
            android:layout_toRightOf="@+id/btnToday"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:clickable="true"
            android:focusable="true"
            android:onClick="popularClickEvent"/>

    </RelativeLayout>   

    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_below="@+id/searchButtons"
        android:layout_above="@+id/bottomLinear"
        android:background="@color/background">

        <ListView
            android:id="@android:id/list"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"/>

    </RelativeLayout>

</RelativeLayout>

© Stack Overflow or respective owner

Related posts about java

Related posts about android