我真的很想改变当我们尝试在 ListView (那里有很多项目)中拉动顶部(或末尾)时出现的蓝色光泽(蓝色突出显示)的颜色。
因此,我想将此颜色从蓝色更改为橙色,伙计们。
http://img835.imageshack.us/img835/5609/28746577.jpg
p/s:
- 我知道蓝色是默认颜色。 (来自上面的 ICS)
- 我添加图像来显示,黄色矩形是出现蓝色光泽(或蓝色高光)的位置
- 在 Android 2.3.6(HTC 设备)上,默认颜色是橙色。我知道默认颜色是蓝色。 (来自上面的 ICS)
谢谢
最佳答案
这是一个对我有用的解决方法:
http://evendanan.net/android/branding/2013/12/09/branding-edge-effect/
public static void brandGlowEffect(Context context, int brandColor) {
//glow
int glowDrawableId = context.getResources().getIdentifier("overscroll_glow", "drawable", "android");
Drawable androidGlow = context.getResources().getDrawable(glowDrawableId);
androidGlow.setColorFilter(brandColor, PorterDuff.Mode.SRC_IN);
//edge
int edgeDrawableId = context.getResources().getIdentifier("overscroll_edge", "drawable", "android");
Drawable androidEdge = context.getResources().getDrawable(edgeDrawableId);
androidEdge.setColorFilter(brandColor, PorterDuff.Mode.SRC_IN);
}
您必须在设置布局后立即在 OnCreate 中调用此方法。
关于安卓 : Change color of blue shine (blue highlight) in List View,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16182962/