12

以某种方式褪色的边缘似乎不适用于 android ics (android 4+) 对于自己的视图。如果我在较低的 android 版本上测试此布局,它会绘制褪色边缘,但不会在 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"           <--
/>

有什么解决方法吗?

4

2 回答 2

26

“使用褪色边缘可能会导致明显的性能下降,并且应该仅在应用程序的视觉设计需要时使用。要请求 API 级别 14 及更高级别的褪色边缘,请改用该android:requiresFadingEdge属性”

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

于 2012-11-27T15:57:28.923 回答
4

您可以从我的问题帖子中的答案中尝试一些想法:在 Android 4.0.3 中设置 textview fading

但是,似乎衰落的边缘在 4.x 上不起作用。之所以?我不知道。

于 2012-08-05T14:15:56.237 回答