简体   繁体   中英

Size of fading edge in Android's Scroll View

I'm trying to add a fading edge in a Scroll View by adding the following property to the XML:

android:requiresFadingEdge="vertical"

Now what I want is to manage the size of this fading edge, I've tried using :

android:fadingEdgeLength="10dp"

but it doesn't have any effect on the final result.

Any guess of what to do it?

set padding to scrollview..thats trick

android:paddingTop="10dp" 
android:paddingBottom="10dp"
android:fadingEdgeLength="10dp"

Fading Edge length must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters).

That's the right property to use, anyway the fading edge might not be looking as you expect.

If that's the scenario the you may be able to achieve the precise look and feel by overlapping a view with a fading gradient shape in its background property.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM