I designed a simple layout for my test App, a TextView, then a ImageView and a TextView. But the second TextView I want it scrollable (by touch).
I have searched and tried many solutions on the net but still can't make it work.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:scrollbars="vertical"
tools:context=".MainActivity" >
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="@string/title"
android:textSize="40sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_centerHorizontal="true"
android:adjustViewBounds="true"
android:contentDescription="@string/ada_lovelace"
android:paddingTop="8dp"
android:src="@drawable/ada_lovelace" />
<ScrollView
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:id="@+id/scroll1"
android:layout_below="@id/imageView1">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:text="@string/hello_world"
android:textSize="22sp" />
</ScrollView>
</RelativeLayout>
Please help me.