ScrollView 的滚动条背景和滑块可以定制,本例使用drawable 为ScrollView定制了滚动条和滑块,滚动条宽度设为12dip ,滑块为蓝色等

<ScrollView xmlns:android=”http://schemas.android.com/apk/res/android”
android:layout_width=”match_parent”
android:layout_height=”wrap_content”
android:scrollbarTrackVertical=”@drawable/scrollbar_vertical_track”
android:scrollbarThumbVertical=”@drawable/scrollbar_vertical_thumb”
android:scrollbarSize=”12dip”
>

<LinearLayout
android:orientation=”vertical”
android:layout_width=”match_parent”
android:layout_height=”wrap_content”>

<TextView
android:layout_width=”match_parent”
android:layout_height=”wrap_content”
android:text=”@string/scrollbar_2_text”/>

<TextView
android:layout_width=”match_parent”
android:layout_height=”wrap_content”
android:text=”@string/scrollbar_2_text”/>
</LinearLayout>
</ScrollView>

ScrollBars->2.Fancy_第1张图片" width="332" height="493" style="padding:0px; border:none; margin:5px auto; font:inherit; vertical-align:baseline; max-width:100%; height:auto; display:block;border:1px solid black;">


更多相关文章

  1. Android(安卓)ListView拖动时背景颜色会变成黑色的解决办法
  2. [置顶] android应用框架系列三,兼容性
  3. Android(安卓)布局添加阴影背景ShadowDrawable
  4. android 中TextView设置部分文字背景色和文字颜色
  5. Lgame引擎搭建和第一个例子
  6. 6.1.5 GridView详解编辑
  7. android 代码控制LinearLayout 宽度高度 报错widget.LinearLayou
  8. Android(安卓)侧滑,左滑,右滑
  9. Android——FragmentTabHost-快速实现底部导航模式的解决方案

随机推荐

  1. Android 内存泄漏——context泄漏
  2. 【最新】】汇总Android(安卓)Studio 2.2
  3. Android Intent之Action应用
  4. android HttpURLConnection conn = null;
  5. Android简单获取经纬度的方法
  6. 反编译apk导入android studio
  7. Android AOSP输入法(LatinIME)输入流程二
  8. android ListView的常用事件
  9. android中wifi,蓝牙等常见设置的控制
  10. Android:指定分辨率和清晰度的图片压缩方