29

enter image description hereI have added a scrollView and if deploy on the android tablet,it has some problems. But it works fine on cellphone.

When users move to the top or bottom of the whole page,it will automatically show the blue shadow which indicates users reaching the bottom of the page. I want to remove those indicator since it affects the UI.

Is there any way to remove or set in the XML?

I have tried different parameter to set on the scrollview but it doesn't work.

Please help.

Thomas Lee
  • 1,001
  • 2
  • 13
  • 31

7 Answers7

64

fadingEdge is deprecated. Use this in your ScrollView:

android:overScrollMode="never"

Ahmad
  • 69,608
  • 17
  • 111
  • 137
Plegge
  • 640
  • 5
  • 5
14

Add this extra line to your ScrollView definition:

android:overScrollMode="never"  

or add this to your code:

findViewById(R.id.sobreScrollView).setOverScrollMode(ScrollView.OVER_SCROLL_NEV‌​ER);
kyogs
  • 6,766
  • 1
  • 34
  • 50
  • Thats really helpful!! Can you please tell me , Is it possible to change the color of the respective default scrollView blue color – Rajat kumar Oct 18 '14 at 12:24
8

Try this:

android:overScrollMode="never" 
Xaver Kapeller
  • 49,491
  • 11
  • 98
  • 86
Ameen Maheen
  • 2,719
  • 1
  • 28
  • 28
7

Add this to the scrollView

android:fadingEdge="none"
AskNilesh
  • 67,701
  • 16
  • 123
  • 163
ShineDown
  • 1,881
  • 3
  • 21
  • 29
  • I have tried this method and it doesn't work. android:fadingEdge="none" android:background="@null" android:cacheColorHint="@null" – Thomas Lee Feb 28 '12 at 07:35
  • 1
    Is it just remove the edge of the border instead of the top or bottom of that page? – Thomas Lee Feb 29 '12 at 03:28
  • 1
    I have added to scrollview or linearlayout inside the scrollview but it doesn't work either. I wonder if there is any solution. – Thomas Lee Feb 29 '12 at 10:20
  • now it is depricated: http://developer.android.com/intl/ja/reference/android/R.attr.html#fadingEdge – kenju Nov 13 '15 at 02:26
3

Pre API level 14:

android:fadingEdge="none"

API level 14+:

android:requiresFadingEdge="none"

See this:

https://developer.android.com/reference/android/R.attr.html#fadingEdge

This attribute is deprecated and will be ignored as of API level 14 (ICE_CREAM_SANDWICH). Using fading edges may introduce noticeable performance degradations and should be used only when required by the application's visual design. To request fading edges with API level 14 and above, use the android:requiresFadingEdge attribute instead.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
kenju
  • 5,866
  • 1
  • 41
  • 41
2

As mentioned by Romain Piel on this post: https://stackoverflow.com/a/7106752/956975, Pim Reijersen pointed out in the comments that android:fadingEdge is deprecated and will be ignored as of API level 14.

Remove the shadow on a ListView/GridView/ScrollView like so

in XML:

android:fadingEdgeLength="0dp"

in Java:

view.setFadingEdgeLength(0);
Community
  • 1
  • 1
marienke
  • 2,465
  • 4
  • 34
  • 66
1

setOverScrollMode(View.OVER_SCROLL_NEVER)

user890973
  • 947
  • 2
  • 8
  • 12