Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid scrollview not scrolling down after keyboard opens
    text
    copied!<p>I have a textview that is inside of a scrollview, it scrolls fine untill the soft keyboard is opened. </p> <p>When the keyboard is opened it act like it scrolled up again with the height of the keyboard.</p> <p><strong>What I have tried</strong></p> <p>I tried this in the manifest, but yielded the exact same results </p> <pre><code>android:windowSoftInputMode="adjustResize" </code></pre> <p>Then this:</p> <pre><code>android:windowSoftInputMode="adjustPan" </code></pre> <p>That seemed to work, but the problem was that it was moving the whole screen up and taking the header out of view.</p> <p>I also tried adding the following in the linear layout</p> <pre><code>android:focusable="true" android:focusableInTouchMode="true" </code></pre> <p>That only caused the app not to focus on the input field (EditText) and the keyboard didn't open automatically, but when you clicked on the input field it would just act the same as before.</p> <p>This is the XML file <strong>code</strong>:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/lightGray" android:orientation="vertical" &gt; &lt;ScrollView android:id="@+id/scrollView" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/bottom_layout" android:layout_marginTop="10dip" &gt; &lt;LinearLayout android:id="@+id/msg_list_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"&gt; &lt;/LinearLayout&gt; &lt;/ScrollView&gt; &lt;RelativeLayout android:id="@+id/bottom_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:background="@android:color/background_light"&gt; &lt;Button android:id="@+id/send_btn" style="?android:attr/buttonStyleSmall" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:text="@string/txt_send" /&gt; &lt;EditText android:id="@+id/msg_edit" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignBottom="@+id/send_btn" android:layout_toLeftOf="@+id/send_btn" android:inputType="text" &gt; &lt;/EditText&gt; &lt;/RelativeLayout&gt; </code></pre> <p></p> <p>Any suggestions?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload