Onscreen keyboard covers up EditText on QVGA800 skin(resolution) in android 1.5 -


in android 1.5 sdk, qvga800 skin(resolution), added 8 edittext in linearlayout. when 8th edittext box tapped, onscreen appears. however, layout doesnt move enough, mean, moves still covers edittext box being typed. how solve ?

main class :

package com.i;  import android.app.activity; import android.os.bundle; import android.widget.edittext;  public class myclass extends activity {     /** called when activity first created. */     @override     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.main);         edittext txt1=(edittext)findviewbyid(r.id.txt1);         edittext txt2=(edittext)findviewbyid(r.id.txt2);         edittext txt3=(edittext)findviewbyid(r.id.txt3);         edittext txt4=(edittext)findviewbyid(r.id.txt4);         edittext txt5=(edittext)findviewbyid(r.id.txt5);         edittext txt6=(edittext)findviewbyid(r.id.txt6);         edittext txt7=(edittext)findviewbyid(r.id.txt7);         edittext txt8=(edittext)findviewbyid(r.id.txt8);     } } 

main.xml :

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="vertical"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     > <textview       android:layout_width="fill_parent"      android:layout_height="wrap_content"      android:text="@string/hello"     />     <edittext android:id="@+id/txt1" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt2" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt3" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt4" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt5" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt6" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt7" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt8" android:layout_width="fill_parent" android:layout_height="wrap_content"/>  </linearlayout> 

thanks.

wrap in scroll view. change main.xml

<?xml version="1.0" encoding="utf-8"?> <scrollview xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent"> <linearlayout     android:orientation="vertical"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     > <textview       android:layout_width="fill_parent"      android:layout_height="wrap_content"      android:text="@string/hello"     />     <edittext android:id="@+id/txt1" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt2" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt3" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt4" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt5" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt6" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt7" android:layout_width="fill_parent" android:layout_height="wrap_content"/>     <edittext android:id="@+id/txt8" android:layout_width="fill_parent" android:layout_height="wrap_content"/>  </linearlayout> </scrollview> 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -