Android: Softkeyboard moving TextEdit out of screen
<p>I am trying to the softkeyboard so the user can enter his information to create a new account on my android app. The problem is that some of my TextEdits are always flowing outside the screen and the user can not see what he actually typed. The screen looks this way:</p>

<p><img src="http://i.stack.imgur.com/U2wzr.png" alt="screenshot"></p>

<p>This screen was built using the following xml code:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="vertical"
android:layout_height="fill_parent"&gt;     

    &lt;com.markupartist.android.widget.ActionBar 
       android:id="@+id/actionbar" 
       style="@style/ActionBar"/&gt;      

    &lt;ScrollView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1.0"&gt;

    &lt;LinearLayout
        android:layout_gravity="bottom"
        android:paddingTop="15dip"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"&gt; 

       &lt;EditText android:id="@+id/txtPhoneNumber" 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dip"
            android:layout_marginRight="15dip"
            android:nextFocusUp="@+id/LoginButton"
            android:nextFocusDown="@+id/txtPassword" 
            android:hint="Phone Number"
            android:inputType="number" 
            android:singleLine="true" /&gt;

       &lt;EditText android:id="@+id/txtPassword" 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dip"
            android:layout_marginLeft="15dip"
            android:layout_marginRight="15dip"
            android:hint="Password"
            android:inputType="textPassword"
            android:singleLine="true"
            android:nextFocusDown="@+id/txtName"/&gt;

       &lt;EditText android:id="@+id/txtName" 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dip"
            android:layout_marginLeft="15dip"
            android:layout_marginRight="15dip"
            android:hint="Name"
            android:singleLine="true"
            android:nextFocusDown="@+id/txtPin"  /&gt; 

        &lt;EditText android:id="@+id/txtPin" 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dip"
            android:layout_marginLeft="15dip"
            android:layout_marginRight="15dip"
            android:hint="Pin"
            android:inputType="number"
            android:singleLine="true" /&gt;            

    &lt;/LinearLayout&gt;

    &lt;/ScrollView&gt;

    &lt;LinearLayout android:id="@+id/buttonsLayout" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="20dip"
            android:layout_marginLeft="15dip"
            android:layout_marginRight="15dip" &gt;    

    &lt;Button android:id="@+id/btnLogin"
        android:layout_width="fill_parent"          
        android:layout_height="wrap_content" 
        android:layout_weight="1.0" 
        android:text="@string/btnLogin"                     
        android:onClick="onRegisterClick" /&gt;                            

&lt;/LinearLayout&gt;   
</code></pre>

<p></p>

<p>And in my AndroidManifest.xml I have defined my Activity this way:</p>

<pre><code>&lt;activity android:name=".activity.NewAccountActivity" 
      android:label="@string/app_name" 
      android:screenOrientation="portrait" 
      android:windowSoftInputMode="stateHidden|adjustResize" /&gt;
</code></pre>

<p>I have tried my different combinations of layout and windowSoftInputMode, but i never can get the TextEdit that is being changed to be visible on the screen. Am I missing anything here?</p>

<p>Thanks for any reply
T</p>
