【发布时间】:2011-05-17 16:30:04
【问题描述】:
我创建了一个列表视图。我需要增加垂直滚动条的宽度。我改变了 android:scrollbarSize。但它不起作用。还想减少滚动条拇指的长度。是否可行。请帮我。
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ListView
android:id="@+id/list_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollX="0px"
android:scrollY="0px"
android:background="#515151"
android:layout_weight="1"
android:scrollbarStyle="outsideOverlay"
android:divider="#FFF"
android:fadeScrollbars="false"
android:scrollbarSize="20dip"/>
</LinearLayout>
【问题讨论】:
-
你能发布你的布局文件吗?
-
将布局放入代码中...请检查一下
-
尝试设置android:layout_width="wrap_content"
-
我不能使用 wrap_content。因为我在对话框中使用列表视图,并且 list_view 应该填充对话框。
-
有解决方案吗?请在这里发帖帮助我。
标签: android listview scrollbar