Android 需要ListView中的自定义滚动条不根据项目进行拉伸/收缩

Android 需要ListView中的自定义滚动条不根据项目进行拉伸/收缩,android,listview,scrollbar,Android,Listview,Scrollbar,我已经为我的ListView使用了自定义滚动条。我使用了以下代码 <ListView android:id="@+id/bars" android:layout_width="fill_parent" android:layout_height="260dp" android:layout_marginTop="10dp" android:divider="@null"

我已经为我的ListView使用了自定义滚动条。我使用了以下代码

<ListView
            android:id="@+id/bars"
            android:layout_width="fill_parent"
            android:layout_height="260dp"
            android:layout_marginTop="10dp"
            android:divider="@null"
            android:dividerHeight="0dp"
            android:fadeScrollbars="false"
            android:fadingEdge="none"
            android:scrollbarStyle="outsideInset"
            android:scrollbarThumbVertical="@drawable/scrollbar_large1"
            android:scrollingCache="false" />


滚动条会根据列表视图中的项目数量拉伸或收缩。如果项目较少,滚动条会拉伸,看起来不太好。如何制作滚动条图像,而不取决于列表项的数量?

使用九块补丁图像。对于
scrollbar\u large1
检查您的/android sdk/platforms/android xx/data/res/drawable mdpi/scrollbar\u handle\u vertical.9.png,尝试使用它。@M Mohsin,我已经在使用一个九补丁映像了。滚动条仍然会拉伸/收缩。是否有其他方法为滚动条提供自定义图像。