【发布时间】:2014-05-23 02:38:22
【问题描述】:
如何在 Android 2.2 下禁用 HorizontalScrollView 的过度滚动?
编辑
我为此使用反射:
HorizontalScrollView hh = (HorizontalScrollView) findViewById(R.id.chartHorizontalView);
viewCls = hh.getClass();
try {
Method m = viewCls.getMethod("setOverScrollMode",
new Class[] { int.class });
int OVER_SCROLL_NEVER = (Integer) viewCls.getField(
"OVER_SCROLL_NEVER").get(hh);
m.invoke(hh, OVER_SCROLL_NEVER);
} catch (Exception e) {
e.printStackTrace();
}
【问题讨论】:
标签: android horizontalscrollview