In Android, I have a Parent RelativeLayout.
Inside that I have, a ScrollView –> TableLayout
The TableLayout contains around 25 Form items (TextView : EditText) combination.
The issue here is, whenever the EditText is selected, the SoftInput keyboard hides the EditText and hence the user cannot view where he is typing the text.
Sample Layout file.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:gravity="fill"
android:orientation="vertical" >
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/retailinfoscroller"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/logininputtime"
android:layout_marginTop="10dip"
android:scrollbars="vertical" >
<TableLayout
android:id="@+id/newstoreregtable"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fadeScrollbars="true"
android:stretchColumns="1" >
<TableRow >
<TextView
android:layout_width="120dip"
android:layout_gravity="center_vertical"
android:layout_marginBottom="5dip"
android:layout_marginLeft="10dip"
android:layout_marginTop="5dip"
android:gravity="right"
android:text="@string/strretailerid"
android:textColor="#000000"
android:textSize="16dip" />
<EditText
android:id="@+id/editretailerid"
android:layout_width="120dip"
android:layout_height="45dip"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_marginTop="5dip"
android:layout_weight="0.6"
android:background="@drawable/edittextsample"
android:clickable="false"
android:cursorVisible="false"
android:editable="false"
android:singleLine="true" >
</EditText>
</TableRow>
<TableRow></TableRow>
</TableLayout>
</ScrollView>
</RelativeLayout>
Basically I just want to have my EditText visible whenever user wants to type in.
I have gone through the forum, but cannot find the fix.
In manifest add
android:windowSoftInputMode="adjustResize"under the Activity tag..