/**
* 滑动到下一个子项,用于首页自动滚动
* @param position
*/
public void fling() {
try {
Class<Gallery> c = (Class<Gallery>) Class.forName("android.widget.Gallery");
Method[] flds = c.getDeclaredMethods();
for (Method f: flds) {
// Log.e("vv", f.getName()); movePrevious moveNext
if ("movePrevious".equals(f.getName())) {
f.setAccessible(true);
f.invoke(this);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
* 滑动到下一个子项,用于首页自动滚动
* @param position
*/
public void fling() {
try {
Class<Gallery> c = (Class<Gallery>) Class.forName("android.widget.Gallery");
Method[] flds = c.getDeclaredMethods();
for (Method f: flds) {
// Log.e("vv", f.getName()); movePrevious moveNext
if ("movePrevious".equals(f.getName())) {
f.setAccessible(true);
f.invoke(this);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}