12

somehow fading edges seems not to work for android ics (android 4+) for own views. If I test this layout on a lower android version it paints the fading edge but not on android 4.1.

<FrameLayout
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"
    android:fadingEdge="vertical"
    android:focusableInTouchMode="true" <-- does not make any change
    android:focusable="true"           <--
/>

Is there any workaround?

Anthea
  • 3,741
  • 5
  • 40
  • 64

2 Answers2

26

"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"

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

ffleandro
  • 4,039
  • 4
  • 33
  • 48
  • 1
    Furthermore: http://www.curious-creature.org/2008/12/22/why-is-my-list-black-an-android-optimization/ – fadden Jun 19 '14 at 14:53
4

You can try some ideas from answer in my question post: Set textview fading in Android 4.0.3

However, it seems like the fading edge won't work on 4.x somehow. The reason why? I don't know.

Community
  • 1
  • 1
Pete Houston
  • 14,931
  • 6
  • 47
  • 60
  • 5
    Fading edges don't work in ICS and beyond because they were deprecated and are now ignored. http://developer.android.com/reference/android/R.attr.html#fadingEdge – Michael Celey Sep 27 '12 at 15:40
  • @Anderson ffleandro posted it as an answer and has plenty of upvotes to go with it. No sense in posting another answer just to make a rep grab. My comment will suffice as it does the job in delivering the information which is the point of this site in the first place. =) – Michael Celey Mar 28 '14 at 21:47