2016-11-09 78 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