Listview 去除顶部阴影


两种方法:

1.直接在代码里

listview.setOverScrollMode(View.OVER_SCROLL_NEVER);


2.自定义ListView

public MyListView(Context context, AttributeSet attrs) {
super(context, attrs);
if (Integer.parseInt(Build.VERSION.SDK) >= 9) {
this.setOverScrollMode(View.OVER_SCROLL_NEVER);
}
}


你可能感兴趣的:(Listview 去除顶部阴影)