I know this question has been asked many times and if I'm doing it again is just because is not exactly the same question. I have already added this to my activity in the Manifest:
android:windowSoftInputMode="stateAlwaysHidden|adjustPan"
And also I have tried using a ScrollView
. As a result, the EditText is correctly moving up when the keyboard appears. However, I have noticed that it still covers a part of the TextView. It is not enough to cover the text but it still seems wrong:
The code to add the TextView is pretty normal:
<LinearLayout
android:id="@+id/login_layout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="50dp"
android:gravity="center_vertical"
android:orientation="vertical">
<EditText
android:id="@+id/user"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="100dp"
android:background="@drawable/edit_text_background"
android:hint="@string/prompt_email"
android:inputType="text"
android:maxLines="1"
android:textSize="15sp" />
So, do you know a way to keep all the TextView above the keyboard? I have only seen this question once but it was not resolved and the guy was using a Fragment, not an Activity.
Thanks