How can I make a vertical linear Layout always scrollable, even when I only have one TextView in my Layout?
- When I scroll up, I want it to scroll and show a blank space at the bottom.
- When I scroll down, I want it to show a blank at the top of my view.
Here is my code:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ScrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/addCategory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Scrollable view"/>
</LinearLayout>
</ScrollView>