android make editText floating when virtual keyboard shown, without resize background -


i have surfaceview in background of activity , edit text on it, need show edit text when virtual keyboard shown withouth resizing surfaceview... @ end need edit text move when virtual keyboard shown

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/main_relative_layout">   <surfaceview     android:layout_width="match_parent"     android:layout_height="match_parent"     android:id="@+id/main_fragment_surfase_view"     />  <linearlayout     android:id="@+id/main_fragment_bottom_menu_layout"     android:layout_alignparentbottom="true"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:paddingbottom="10dp"     android:paddingtop="10dp">      <view         android:layout_weight="0.5"         android:layout_width="0dp"         android:layout_height="0dp" />      <button style="@style/roundbuttonmainscreenfragment" />      <view         android:layout_weight="0.5"         android:layout_width="0dp"         android:layout_height="0dp" />      <button style="@style/roundbuttonmainscreenfragment" />      <view         android:layout_weight="0.5"         android:layout_width="0dp"         android:layout_height="0dp" />      <button style="@style/roundbuttonmainscreenfragment" />      <view         android:layout_weight="0.5"         android:layout_width="0dp"         android:layout_height="0dp" />      <imagebutton         android:src="@android:drawable/ic_menu_camera"         style="@style/roundbuttonmainscreenfragment"         android:contentdescription="delete" />      <view         android:layout_weight="0.5"         android:layout_width="0dp"         android:layout_height="0dp" /> </linearlayout> <framelayout     android:layout_width="match_parent"     android:layout_height="200dp"     android:id="@+id/list_view_container"     android:layout_alignparenttop="true"     android:isscrollcontainer="true">  </framelayout>     <edittext         android:visibility="visible"         android:id="@+id/main_screen_edit_text"         android:alpha="0.5"         android:layout_above="@id/main_fragment_bottom_menu_layout"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:singleline="true"         android:layout_gravity="bottom"/> </relativelayout> 

try adding following line androidmanifest.xml

    <activity         android:name="youractivityname"         android:configchanges="orientation|keyboardhidden|screensize"         android:windowsoftinputmode="adjustpan" >     </activity> 

more info on can found here under android:windowsoftinputmode


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -