I have two EditText
s and one subm开发者_运维百科it button but when I enter text in the EditText then my submit button hides below the soft keyboard so how to make it above keyboard when the keyboard appears, i.e., The Button should be visible. I have set a background image in the layout and stuck only two TextBoxs and a button on the background image.
My xml is below.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:background="@drawable/user_id_bg2" >
<EditText
android:inputType="textNoSuggestions"
android:text=""
android:id="@+id/editText1"
android:singleLine="true"
android:hint="Enter Your User Id"
android:layout_marginTop="85dip"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:layout_height="40dip"
android:layout_width="fill_parent">
</EditText>
<EditText
android:inputType="text|textNoSuggestions"
android:password="true"
android:singleLine="true"
android:hint="Enter Your Password"
android:layout_marginTop="125dip"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:id="@+id/editText2"
android:imeOptions="actionDone"
android:layout_height="40dip"
android:layout_width="fill_parent"/>
<ImageView
android:id="@+id/buttonimg"
android:layout_marginTop="200dip"
android:layout_marginLeft="237dip"
android:layout_width="wrap_content"
android:layout_height="40dip"
android:background="@drawable/go_button"
/>
</RelativeLayout>
精彩评论