Try to wrap EditText
inside ScrollView
to make it scrollable. Setting ScrollView
layout_weight
attribute to 1
and fillViewport
to true
will force ScrollView to fill available space but never push TextView
out of the screen.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true" >
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="top|left"
android:inputType="textMultiLine"
android:scrollbarAlwaysDrawVerticalTrack="false"
android:scrollbarStyle="insideOverlay" >
<requestFocus />
</EditText>
</ScrollView>
</LinearLayout>