如何从ListView控件的右边缘设置边距垂直滚动条? [英] How to set margin for Vertical Scrollbar from the right edge in ListView?

查看:981
本文介绍了如何从ListView控件的右边缘设置边距垂直滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关Android平台:

For Android Platform:

我需要把保证金右侧列表视图垂直滚动条(这是自定义)。请参阅所附的图像。默认滚动条粘在extream右侧的列表视图中。

I need to put margin on right side of the vertical scrollbar in listview (it is customized). Please see the attached image. Default scrollbar sticks to the extream right side of the listview.

需要你的手。谢谢。

推荐答案

请参照<一个href="http://developer.android.com/reference/android/view/View.html#attr_android%3ascrollbarStyle">documentation在安卓scrollbarStyle 查看属性。你可能想使用的风格是 insideOverlay (连同安卓paddingRight )。

Refer to documentation on android:scrollbarStyle attribute of View. The style you probably want to use is insideOverlay (in conjunction with android:paddingRight).

类似于

<LinearLayout android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:gravity="center_horizontal"
    android:paddingRight="50dip">
    <ListView
        android:id="@+id/scrollable_table" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:scrollbarStyle="insideOverlay">
    .
    .
    .

这篇关于如何从ListView控件的右边缘设置边距垂直滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆