have a look at the code from an xml file where i am using two textviews and one button…
the problem is that when i click on a textview the default keyboard appears and half of the second textview and the button hides…then u have to manually close the keyboard and then u will b able to click on the send button…
my question is how can i perform that when the keyboard is shown the whole view slides up or shrinks so that the button is visible….
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<EditText
android:id="@+id/etRecieverNum"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions"
>
</EditText>
<EditText
android:id="@+id/etMessageToBeSent"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="0.82"
android:gravity="top|left"
android:inputType="textNoSuggestions"
/>
<Button
android:id="@+id/bSend"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Send" />
</LinearLayout>
You can put
in your manifest.. or put
adjustResize
The activity’s main window is always resized to make room for the soft keyboard on screen.
adjustPan
The activity’s main window is not resized to make room for the soft keyboard. Rather, the contents of the window are automatically panned so that the current focus is never obscured by the keyboard and users can always see what they are typing. This is generally less desirable than resizing, because the user may need to close the soft keyboard to get at and interact with obscured parts of the window.