I'm actually trying to fit a fullScreen activity on a little mobile. Here is my layout :
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello 1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello 2"/>
<LinearLayout
android:id="@+id/theLinearLayoutIWantToSee"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<CustomEditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<CustomEditText
android:id="@+id/editText2"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="click"/>
</LinearLayout>
<LinearLayout
android:id="@+id/myLinearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"></LinearLayout>
...Some TextViews...
<LinearLayout
android:id="@+id/myLinearLayout3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
...Some TextViews...
</LinearLayout>
</LinearLayout>
</ScrollView>
My problem is, when the keyboard shows up by clicking on one of the editTexts, I want to center the screen on theLinearLayoutIWantToSee
, with the button at the bottom.
Actually, if I click for example on the first editText, I'll only see the keyboard, the editText, and the things on top of it.
I've obviously tried to put adjustPan
and adjustResize
in my manifest but it doesn't solve my problem.
Do you have some suggestions please?