2016-11-09 44 views
3

enter image description here滚动型Scrollbartrack能见度

enter image description here

我想删除下面scrollbarthumb所示的阴影(scrollbartrack)。 但无法做到这一点。我试图设置android:scrollbarTrackVertical="@null"

请忽略黑色部分。

+0

具有u试图机器人:滚动条=”没有” ?在你的滚动条标签 –

+0

我想滚动条,但不是轨道出现的影子 – Bipin

+0

编辑答案 –

回答

-1

您可以使用XML或代码。

在XML:

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:id="@+id/yourScroll" 
    android:scrollbars="none" <!-- add this --> 
    > 

或代码:

yourScrollView.setVerticalScrollBarEnabled(false); 
yourScrollView.setHorizontalScrollBarEnabled(false); 

编辑

您已更改的问题跟你的新形象,为任务插件作为您的要求可绘制的图像10

<ScrollView 
     android:scrollbarThumbVertical="@drawable/line" <--like this--> 
     android:id="@+id/my_scroll" 
     android:layout_width="match_parent" 
     android:layout_height="500dp"> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:orientation="vertical"> 
      <LinearLayout 
       android:layout_width="match_parent" 
       android:layout_height="300dp"> 
      </LinearLayout> 
      <LinearLayout 

       android:layout_width="match_parent" 
       android:layout_height="400dp"> 
      </LinearLayout> 

     </LinearLayout> 
    </ScrollView> 

注意:我drawble图像包含透明区域(在左右两侧),这就是为什么它的位权从边缘

enter image description here

+0

你可以发布你的照片... – Bipin