Remove overscroll glow in android?

2019-09-08 17:22发布

In my application I am implementing the JasonFry overscroll listview, though I want to get rid of the annoying blue glow that appears on the scroll function. It seems very odd that it is so complicated to remove this... Any help would be greatly appreciated

1条回答
狗以群分
2楼-- · 2019-09-08 17:50

like I answered here To remove blue glow completely:

android:overScrollMode="never" place this attribute inside listview.
To change glow color add this code in application class

int glowDrawableId = getResources().getIdentifier("overscroll_glow", "drawable", "android");
        int edgeDrawableId = getResources().getIdentifier("overscroll_edge", "drawable", "android");
        Drawable androidGlow = ContextCompat.getDrawable(this, glowDrawableId);
        Drawable androidEdge = ContextCompat.getDrawable(this, edgeDrawableId);
        androidGlow.setColorFilter(getResources().getColor(R.color.white_20), PorterDuff.Mode.SRC_IN);
        androidEdge.setColorFilter(getResources().getColor(R.color.white_20), PorterDuff.Mode.SRC_IN);
查看更多
登录 后发表回答