Remove overscroll glow in android?

我只是一个虾纸丫 提交于 2020-01-25 20:27:11

问题


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:


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);


来源:https://stackoverflow.com/questions/32029186/remove-overscroll-glow-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!