I Cant See Contents of first few rows of my ListView when Keyboard is Visible.
I have spent the day trying various layout code out there as well as my own to fix this and I now understand the issue a little more to help somebody to help me solve it.
The issue is if i specify the height of the listview (or its container) to fill_parent then that is making android think that the bottom of the listview (bottom of the screen) is the part to show above the keyboard, even though there is no actual contents yet to show there. I cant event scoll up to the beginning of my list contents for some reason. Specifying just wrap content just shows a small area shwoing the list as expected.
Here's my latest layout code (all attempts produce the same issue)
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/RelativeLayoutchat"
>
<LinearLayout
android:orientation="horizontal"
android:gravity ="clip_horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerInParent="true">
</LinearLayout>
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ListView
android:id="@+id/MessagesListView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:transcriptMode="alwaysScroll"
android:divider="#000000"
android:clickable="false"
android:layout_weight="9"
android:cacheColorHint="#00000000"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1"
style="@android:style/ButtonBar"
android:gravity="center"
android:paddingLeft="3dip"
android:paddingTop="3dip"
android:paddingRight="3dip">
<EditText
android:id="@+id/msgBox"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="5"
android:enabled="true"
android:textSize="17sp"
android:maxLength="150"/>
<Button
android:id="@+id/sendbutton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="send"
android:layout_weight="4"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
Any help is really appreciated.