/android_scroll/res/layout/main.xml代码如下:
<?xml version="1.0" encoding="utf-8"?>
<!--
ScrollView 标签为滚动View标签,当内容超过窗口可视范围会自动出现滚动条
android:scrollbarThumbVertical:指定滚动条的背景图片
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#ffF4F4"
android:fadingEdge="vertical"
android:fadingEdgeLength="100dip"
android:scrollbarThumbVertical="@drawable/scrollbackground">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
android:textColor="#ff000000"/>
</ScrollView>
![](https://img-my.csdn.net/uploads/201203/27/1332841082_6189.png)