Android programming down to the top edge of the ListView blue or yellow shadow

Source: Internet
Author: User

Original address: http://www.cnblogs.com/sunzn/p/3487509.html

By default, a yellow or blue shadow appears when the ListView is sliding to the top or bottom. The methods that are resolved on different versions can be resolved by setting android:fadingedge= "None" in the properties of the ListView before the 2.3 release, but the method is not valid in version 2.3 and above, where You can set the pattern by overriding the ListView by using code to prevent its shadows from appearing, so as not to affect aesthetics. The code is as follows:

Package Com.sunzn.cview;import Android.content.context;import Android.os.build;import android.util.AttributeSet; Import Android.view.view;import Android.widget.listview;public class Customlistview extends ListView {public    Customlistview (Context context) {        super (context);    }    Public Customlistview (context context, AttributeSet Attrs) {        Super (context, attrs);        if (Integer.parseint (Build.VERSION.SDK) >= 9) {            this.setoverscrollmode (view.over_scroll_never);}}    }

Android programming down to the top edge of the ListView blue or yellow shadow

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.