不知何故,褪色的边缘似乎不适用于用于自己视图的android ics(android 4+)。如果我在较低的安卓版本上测试这个布局,它会画出衰落的边缘,但在安卓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" <--
/>
有什么变通办法吗?
"使用衰落边缘可能会导致明显的性能下降,只有在应用程序的视觉设计需要时才应使用。若要请求API 14级及以上级别的衰落边缘,请使用android:requiresFadingEdge
属性而不是
http://developer.android.com/reference/android/R.attr.html#fadingEdge
你可以在我的问题帖子中尝试一些想法:在Android 4.0.3 中设置文本视图淡出
然而,似乎衰落的边缘在4.x上不起作用。为什么?我不知道。