I have a page with various edit text and spinner. To enable scroll i have put android:windowSoftInputMode="adjustResize" into my manifest with the activity. But when I am scrolling my view my focused edit text is losing focus. I mean, suppose i have first edit text focused, and i scroll down, and come back to my first edit text but now my first edit text has lost its focus. Interesting point is that when i am testing the same thing in API level4.0 its working fine, not in pre 4.0
Please help me what to do or suggest something which i losing out.
And for code, its just few edit texts which are wokring
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<EditText
android:id="@+id/et_user"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:singleLine="true" />
</LinearLayout>
</LinearLayout>
</ScrollView>
This is what android is providing, and there may be some work around, but presently this is how it works. So What I can tell you is to be with this restriction. Any update will inform you.