11

I'm having a problem with a text view embedded in a ScrollView. That is, when I scroll the text a thin orange line briefly appears to show that I've gone as far as a can in a particular direction. I've tried a couple of things like "android:fadingEdge="none" and setting the background color, but it's just staying there.

How do I get rid of or control these "end of scroll" colors?

Jack BeNimble
  • 35,733
  • 41
  • 130
  • 213

1 Answers1

44

What you're seeing isn't the "fading edge" normally shown while you're scrolled into content, it's the "over-scroll" effect in Gingerbread and newer. From your XML you can set android:overScrollMode to "always", "never", or "ifContentScrolls".

"always" and "never" should be self-explanatory, "ifContentScrolls" will only show the effect if the content does not fully fit within the view without scrolling.

adamp
  • 28,862
  • 9
  • 81
  • 69
  • 1
    Yeah, ignore my answer -- I misread what the question was about. Overscroll is correct. You can also set it in code with [View#setOverScrollMode()](http://developer.android.com/reference/android/view/View.html#setOverScrollMode(int)) – Joe Jun 15 '11 at 00:28
  • That answers another question I had, which was how to indicate a scroll was available. Also what it was I was looking at. However, I still can't seem to change that orange color... – Jack BeNimble Jun 15 '11 at 00:40
  • No, there is currently no public API to change the effect. – adamp Jun 15 '11 at 03:42
  • Ideally it can be done, somehow i tried for scrollview and the darn thing did not work. However, check this http://stackoverflow.com/questions/6889908/android-scrollview-fading-edge you can completely hide it be making it return 0.0F always. – Jayshil Dave Jan 28 '13 at 10:54