问题
Scrollable views such as the ListView have a fade blue effect along the edges where there is no content and scroll to the end. How can I close the effect?
at listview i can use :
setHorizontalFadingEdgeEnabled(false);
android:fadingEdge="none"
android:requiresFadingEdge="none"
but at the viewPager not useful,can give me some advice
回答1:
I have a solution:
android:overScrollMode="never"
Now everything is OK. I found the solution here.
回答2:
pengwang's answer is good,but it is above android 10.If we use lower version.Try this.
try{
Method method = context.getClass().getMethod("setOverScrollMode",int.class);
Field field = context.getClass().getField("OVER_SCROLL_NEVER");
if(method!=null && field!=null){
method.invoke(viewpager,field.getInt(View.class));
}
}
catch(Exception e){
}
来源:https://stackoverflow.com/questions/18716177/is-there-a-way-to-disable-fading-that-a-viewpager-has-scroll-to-edges