Before writing this question I have read through the following answers/articles:
Android soft keyboard covers edittext field
Android keyboard obscures EditText
http://developer.android.com/resources/articles/on-screen-inputs.html
Soft Keyboard Overlapping with EditText Field
The Android soft keyboard is set by default to pan which means it will keep all the editable regions above the keyboard. However it does not pan enough. When I run it and press the edittext that is close to the bottom of the screen, the keyboard comes up and edittext is moved up but not enough to be able to see what is being typed in it. I have used/tried the following:
android:windowSoftInputMode="adjustPan" in the manifest of the Activity. This made no difference. I have also tried putting values of adjustUnspecified and adjustResize too. None of them works.
<uses-sdk android:minSdkVersion="3" /> in the manifest file. My application is targetted for sdk 2.1 and above. Even though, I tried it and did not work.
Using a ScrollView. Does not work either.
Is there a way to manually manage how much "panning" does a keyboard do when a specific edittext is pressed.
Below is my xml file.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff">
<ImageView
android:id="#+id/header"
android:layout_width="320dip"
android:layout_height="86dip"
android:background="#drawable/header_bg">
</ImageView>
<ImageView
android:layout_width="320dip"
android:layout_height="200dip"
android:layout_alignParentBottom="true"
android:background="#drawable/bg1_btm">
</ImageView>
<TextView android:text="Hostname"
android:id="#+id/lbl_hostname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/header"/>
<TextView android:text="(Current)"
android:id="#+id/lbl_hostname_current"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/lbl_hostname"
android:layout_below="#id/header" />
<EditText android:text="EditText"
android:id="#+id/editText_hostname"
android:layout_below="#id/lbl_hostname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLength="25">
</EditText>
<TextView android:text="Registration URL"
android:id="#+id/lbl_registration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/editText_hostname" />
<TextView android:text="(Current)"
android:id="#+id/lbl_registration_current"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/editText_hostname"
android:layout_toRightOf="#id/lbl_registration" />
<TextView android:text="http://"
android:id="#+id/lbl_url_prefiz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/lbl_registration"
android:paddingTop="10dip" />
<EditText android:text="EditText"
android:id="#+id/editText_registration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf ="#id/lbl_url_prefiz"
android:layout_below="#id/lbl_registration">
</EditText>
<TextView android:text="Chat"
android:id="#+id/lbl_chat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/editText_registration"/>
<TextView android:text="(Current)"
android:id="#+id/lbl_chat_current"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/editText_registration"
android:layout_toRightOf="#id/lbl_chat"/>
<EditText android:text="EditText"
android:id="#+id/editText_chat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/lbl_chat">
</EditText>
<TextView android:text="SSID"
android:id="#+id/lbl_ssid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/editText_chat" />
<TextView android:text="(Current)"
android:id="#+id/lbl_ssid_current"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/editText_chat"
android:layout_toRightOf="#id/lbl_ssid"
/>
<EditText android:text="EditText"
android:id="#+id/editText_ssid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/lbl_ssid"
android:maxLines="1"
android:inputType="text"
android:layout_marginBottom="25dip">
</EditText>
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/ButtonSave"
android:text="Save"
android:layout_below="#id/editText_ssid"
android:layout_alignParentLeft="true">
</Button>
<Button android:text="Continue"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="#+id/ButtonContinue"
android:layout_below="#id/editText_ssid"
android:layout_alignParentRight="true">
</Button>
</RelativeLayout>
Try
android:windowSoftInputMode="adjustResize"
worked fine for me :)
Try to set your all controls layout heights and widths using fill_parent or match_parent...instead of using hard coded values...
also remove this if you are using this as it might be pushing your app downwards...
getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
hope it works...
Related
I'm trying to get the editTexts, and sign in button to move up when the software keyboard is out however I want the background to not be compressed(I'm going to add an image soon). I have the TextView(Login), two EditTexts(email and password) and signin button in a ScrollView because I thought that might help however I have not be able to figure anything out.
http://i.imgur.com/vlYifc6.png
http://i.imgur.com/vlYifc6.png
This is the xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
android:paddingBottom="#dimen/activity_vertical_margin" tools:context=".MainActivity">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="#+id/scrollView"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" >
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:gravity="center"
android:id="#+id/textLayout">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Login"
android:id="#+id/loginView"
android:textSize="22dp"
android:layout_above="#+id/textLayout"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="#+id/emailTextfield"
android:inputType="textEmailAddress"
android:background="#android:drawable/edit_text"
android:textColor="#android:color/primary_text_light"
android:text="andresc1305#yahoo.com"
android:hint="Email" />
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:hint="Password"
android:text="Andres123"
android:background="#android:drawable/edit_text"
android:textColor="#android:color/primary_text_light"
android:ems="10"
android:id="#+id/passwordTextfield" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SIGN IN"
android:background="#android:color/transparent"
android:textSize="24dp"
android:id="#+id/signinButton"
android:layout_below="#+id/textLayout"
android:layout_centerHorizontal="true"
android:onClick="onSigninClick"/>
</LinearLayout>
</ScrollView>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Forgot your password?"
android:background="#android:color/transparent"
android:textSize="14dp"
android:id="#+id/forgotButton"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:onClick="onPasswordRecoverClick"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Register"
android:background="#android:color/transparent"
android:textSize="14dp"
android:id="#+id/registerButton"
android:layout_alignTop="#+id/forgotButton"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:onClick="onRegisterClick"/>
</RelativeLayout>
Look at this answer. In short, your problem can most likely be solved by setting the following in your AndroidManifest.xml inside the relevant activity or application element:
android:windowSoftInputMode="adjustResize"
#PPartisan
This is without:
android:windowSoftInputMode="adjustResize"
http://i.imgur.com/tbNioU2.png
This is with:
http://i.imgur.com/7ZePHjS.png
Beside the compression you can see my "Forgot your password" and "Register" buttons but I have those outside my ScrollView in the XML. Is there a way to scroll the LinearLayout (which contains the Login(TextView, email(EditText), password(EditText), and Signin(button) up when the software keyboard comes up?
The answer by zmilojko seems like what I want to do but he only says to add the ScrollView and not what to do after that has been added. Is there something I can place in the to make it move up when the software keyboard comes up?
see this thread, i think it can help you
layout of the screen moves up when keyboard is displayed
or just try to put this in your xml:
android:windowSoftInputMode="adjustPan"
or this
android:windowSoftInputMode="adjustNothing"
Seems like it works different in each case.
So I am making a texting app just to mess around with the different things in android programming and have yet to run into a problem that I can't find the answer for online. I have tried several different answers from this site and other android programming forums and not one of them has worked every time. There are some examples that work every other time, whereas other examples will work only once. This is the only thing left in the app that I need to figure out for UI functionality.
I have an XML layout file as such:
<RelativeLayout
android:id="#+id/rlActionBar2"
android:layout_width="fill_parent"
android:layout_height="44dp" >
</RelativeLayout>
<RelativeLayout
android:id="#+id/rlAddContact"
android:layout_width="fill_parent"
android:layout_height="44dp"
android:layout_below="#+id/rlActionBar2"
android:background="#drawable/new_message_background"
android:padding="0dp" >
<TextView
android:id="#+id/tvTo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="8dp"
android:text="#string/text_to"
android:textColor="#7F7F7F"
android:textSize="17sp" />
<EditText
android:id="#+id/txtContact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#id/tvTo"
android:layout_marginLeft="6dp"
android:layout_toLeftOf="#+id/btnAddContact"
android:layout_toRightOf="#id/tvTo"
android:background="#00000000"
android:hint="#string/contact_name"
android:inputType="textPersonName"
android:maxLines="1"
android:textColor="#000000"
android:textSize="16sp" >
</EditText>
<Button
android:id="#+id/btnAddContact"
android:layout_width="28.5dp"
android:layout_height="28.5dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:background="#drawable/add_button"
android:padding="0dp" />
</RelativeLayout>
<ScrollView
android:id="#+id/svMessageView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="#+id/rlNewMessage"
android:layout_alignParentLeft="true"
android:layout_below="#id/rlAddContact"
android:background="#DBE2ED" >
<LinearLayout
android:id="#+id/llMessages"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#DBE2ED"
android:isScrollContainer="true"
android:orientation="vertical"
android:paddingTop="11dp" >
</LinearLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/rlNewMessage"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#drawable/messagebar_background"
android:gravity="bottom"
android:padding="0dp" >
<Button
android:id="#+id/btnAttatchment"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_alignBottom="#+id/txtMessageBox"
android:layout_marginLeft="6dp"
android:background="#drawable/camera_icon" />
<EditText
android:id="#+id/txtMessageBox"
android:layout_width="253dp"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp"
android:layout_marginLeft="6dp"
android:layout_marginTop="8dp"
android:layout_toRightOf="#id/btnAttatchment"
android:background="#drawable/messagebox_background"
android:hint="#string/app_name"
android:inputType="textMultiLine"
android:maxLines="6"
android:minHeight="26dp"
android:textSize="17sp" >
</EditText>
<Button
android:id="#+id/btnSend"
android:layout_width="58dp"
android:layout_height="26dp"
android:layout_alignBottom="#id/txtMessageBox"
android:layout_alignParentRight="true"
android:layout_marginRight="6dp"
android:background="#drawable/send_button"
android:text="#string/send_button"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="14sp"
android:textStyle="bold" />
</RelativeLayout>
</RelativeLayout>
My problem is getting the ScrollView svMessageView to automatically scroll to the bottom every time the soft keyboard comes onto the screen for the user to type. The RelativeLayout rlNewMessage moves up when the keyboard appears, and the bottom of svMessageView is set to stick to the top of rlNewMessage and that works, but I can't get the svMessageView to scroll to the bottom by itself.
Images:
After soft keyboard loads (not what I want): http://imgur.com/8Kptge3
After soft keyboard loads (what I want): http://imgur.com/BcDcFPY
If more information is needed for you to figure out the problem let me know and I will post it asap.
I did not test it, but you may try scrollView.fullScroll(View.FOCUS_DOWN); on EditText touch listener perhaps.
Add this in your Manifest.xml for Activity and feed me back
android:windowSoftInputMode="adjustNothing"
So here is my XML. I am trying to fill the whole screen and when I view it in Eclipse, it fills the whole screen. However, when I open it on my phone, everything is smaller and there are views overlaying. I don't know what's going on.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="#+id/front"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:text="Front"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/frontInput"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_below="#+id/front"
android:ems="10" >
<requestFocus />
</EditText>
<TextView
android:id="#+id/back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/frontInput"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:text="Back"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/backInput"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_below="#+id/back"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:ems="10"
android:inputType="textMultiLine" />
<TextView
android:id="#+id/background"
android:layout_width="wrap_content"
android:layout_marginLeft="5dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/backInput"
android:layout_marginTop="44dp"
android:text="Background"
android:textAppearance="?android:attr/textAppearanceMedium" />
<Spinner
android:id="#+id/colors_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/backInput"
android:layout_marginLeft="30dp"
android:layout_marginTop="22dp"
android:layout_toRightOf="#+id/background"
/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/colors_spinner" >
<Button
android:id="#+id/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Save" />
<Button
android:id="#+id/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Cancel" />
</LinearLayout>
</RelativeLayout>
this is what it looks in Eclipse.
But I get this:
Another thing is that when I open the keyboard my view does not rezise so you can see everything but smaller so you can see what you are typing etc... I have added the android:windowSoftInputMode="adjustResize" for the specific activity but nothing is happening... Any ideas? Thanks guys...
If you use adjustResize it will resize everything to fit as best it can. The other option is adjustPan, which will scroll the window so that the focused EditText will be in the view and the caret visibile. Other than that there's no real way to control things.
In your case you have some exact heights in there, so it won't work well with a resize, since you can't shrink an exact height.
Also, never trust how things look in Eclipse. Its an attempt to lay things out that shares no code with how Android really does things, it should be viewed as an estimate. Real layouts may end up looking significantly different, especially for complex layouts.
When I tap on a text field and the keyboard pops up, the upper few fields of my ScrollView hide behind the ActionBar.
If you look at the scrollbar, that is at the very top. That means even if I scroll up now, the elements will not come into view.
I am using ActionBarSherlock. I am not sure if it is the problem with the ABS or with the ScrollView.
Here is the code of my scrollView:
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/scrollView_MessageUpdate"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
tools:context=".MessengerActivity"
android:scrollbarStyle="outsideOverlay"
android:background="#drawable/repeating_bg"
>
<RelativeLayout
android:id="#+id/RelativeLayout_MessageUpdate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:gravity="center"
android:background="#drawable/repeating_bg"
>
<EditText
android:id="#+id/txtPostedBy"
android:hint="#string/txtPostedByHint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="12"
android:inputType="none"
android:layout_marginTop="100dip">
<requestFocus />
</EditText>
<EditText
android:id="#+id/txtPostTitle"
android:hint="#string/txtPostTitleHint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/txtPostedBy"
android:ems="12"
android:layout_marginTop="3dip"
android:inputType="text">
</EditText>
<EditText android:id="#+id/txtMessage"
android:hint="#string/txtMessageHint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lines="3"
android:gravity="top|left"
android:inputType="textMultiLine"
android:scrollHorizontally="false"
android:layout_alignLeft="#+id/txtPostTitle"
android:layout_alignRight="#+id/txtPostTitle"
android:layout_below="#+id/txtPostTitle"
/>
<EditText android:id="#+id/txtComment"
android:hint="#string/txtCommentHint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lines="5"
android:gravity="top|left"
android:inputType="textMultiLine"
android:scrollHorizontally="false"
android:layout_alignLeft="#+id/txtPostTitle"
android:layout_alignRight="#+id/txtPostTitle"
android:layout_below="#+id/txtMessage"
/>
<Button
android:id="#+id/btnUpdateMessage"
android:text="#string/btnUpdateText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/txtComment"
style="#style/styledBuutonNoIcon_text"
android:background="#drawable/styled_inner_form_button"
android:layout_alignLeft="#+id/txtPostTitle"
android:layout_alignRight="#+id/txtPostTitle"
android:layout_marginTop="3dip" />
<Button
android:id="#+id/btnCancelMessage"
android:text="#string/btnCancelText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/btnUpdateMessage"
style="#style/styledBuutonNoIcon_text"
android:background="#drawable/styled_inner_form_button"
android:layout_alignLeft="#+id/txtPostTitle"
android:layout_alignRight="#+id/txtPostTitle"
android:layout_marginTop="3dip" />
<!--
<Button
android:text="#string/btnDeleteText"
android:id="#+id/btnDeleteSchool"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/btnCancelSchool"
style="#style/styledBuutonNoIcon_text"
android:background="#drawable/styled_inner_form_button"
android:layout_alignLeft="#+id/txtSchoolWebsite"
android:layout_alignRight="#+id/txtSchoolWebsite"
android:layout_marginTop="3dip"
/>
-->
</RelativeLayout>
</ScrollView>
Set android:windowSoftInputMode of your activity in AndroidManifest.xml to "adjustPan".
According to Documentation:
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.
I solved the same problem by removing "center" in the main layout
android:layout_gravity="center"
android:gravity="center"
This is a follow up to this question.
Have spent days on this issue, and can't seem to get what I want. What I need very simply is this entire view to be scrollable when the keyboard pops up after touching an edittext field:
Note that this view is not scrollable, it doesn't need to be.
So when the user hits the edittext field (say the first one), it looks like this:
And if he/she chooses, the view can be scrolled to end no further that the way it looks here:
I've tried every combination of scrollview I could think of, but all it does is stretch my background image. I'm sure there is a simple solution to this, but I just can't find it. I would really be grateful to anyone who can solve this problem. Here is the XML for the layout by the way:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#drawable/background"
android:orientation="vertical"
android:paddingLeft="60dp"
android:paddingTop="53dp" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text1"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText1"
android:layout_width="173dp"
android:layout_height="wrap_content"
android:layout_below="#id/textView1"
android:layout_marginTop="3dp"
android:inputType="numberDecimal" />
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/editText1"
android:layout_marginTop="3dp"
android:text="text2"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText2"
android:layout_width="173dp"
android:layout_height="wrap_content"
android:layout_below="#id/textView2"
android:layout_marginTop="3dp"
android:inputType="numberDecimal" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/editText2"
android:layout_marginTop="3dp"
android:text="text3"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText3"
android:layout_width="173dp"
android:layout_height="wrap_content"
android:layout_below="#id/textView3"
android:layout_marginTop="3dp"
android:inputType="numberDecimal" />
<Button
android:id="#+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/editText3"
android:layout_marginTop="3dp"
android:text="text4" />
<ImageView
android:id="#+id/gearImage3"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_alignLeft="#+id/button1"
android:layout_below="#id/button1"
android:layout_marginTop="70dp"
android:clickable="true"
android:contentDescription="#string/gearDescription_string"
android:src="#drawable/gear" />
</RelativeLayout>
Kindly note the latter two images are not from the real app (photoshopped to show what I need) but the first one is from my app. Thanks.
A ScrollView only scrolls to as far as there is data. So simply adding a ScrollView should just fix your problem. Add this to the start of your xml:
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/ScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
and then obviously add this at the bottom, after everything else:
</ScrollView>
I use this in my app and when the keyboard shows, I can still scroll to the bottom of the page. If your fields as shown in screenshot 1, are not longer than one normal phone page, it won't scroll anyway. It will only scroll when you have the keyboard up as it can't then see the whole screen.
Hope this helps!