Android的芯片衰落的边缘不工作芯片、边缘、工作、Android

2023-09-06 08:25:44 作者:笑你像狗.

不知怎么衰落的边缘似乎没有为Android IC的工作(机器人4+)对自己的看法。如果我测试这个布局在一个较低的Andr​​oid版本也描绘了衰落的边缘,但不是在Android 4.1。

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?

推荐答案

使用衰落的边缘可能会带来显着的性能下降,仅由应用程序的可视化设计要求时,应使用。请与API的14级及以上的衰落边缘,使用安卓requiresFadingEdge 属性,而不是

"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