3
在Google Nexus S上,當您嘗試拖動ListView的末尾時,會出現黃色漸變,其大小由拖動的距離決定。如何改變這種漸變的顏色?我看不到任何明顯的東西。更改ListView結尾處的漸變顏色
它是而不是 cacheColorHint。
在Google Nexus S上,當您嘗試拖動ListView的末尾時,會出現黃色漸變,其大小由拖動的距離決定。如何改變這種漸變的顏色?我看不到任何明顯的東西。更改ListView結尾處的漸變顏色
它是而不是 cacheColorHint。
它似乎在ScrollView實現中被硬編碼。看看this,上線1389 setOverScrollMode()
方法(確切的行號可能,如果有人將更新源改變):
@Override
public void setOverScrollMode(int mode) {
if (mode != OVER_SCROLL_NEVER) {
if (mEdgeGlowTop == null) {
final Resources res = getContext().getResources();
final Drawable edge = res.getDrawable(R.drawable.overscroll_edge);
final Drawable glow = res.getDrawable(R.drawable.overscroll_glow);
mEdgeGlowTop = new EdgeGlow(edge, glow);
mEdgeGlowBottom = new EdgeGlow(edge, glow);
}
} else {
mEdgeGlowTop = null;
mEdgeGlowBottom = null;
}
super.setOverScrollMode(mode);
}
,我可以看到的唯一方法是定義你自己的滾動型的實施,覆蓋setOverScrollMode()
使用你自己的drawables,然後實現你自己的ListView
,它將使用你的ScrollView實現而不是標準實現。
什麼是EdgeGlow?我在哪裏可以找到這個課程? – 2011-11-23 22:22:34