【发布时间】:2015-07-10 18:51:34
【问题描述】:
所以我有一个只有一个视图的滚动视图(EditText),我想实现
dispatchTouchEvent(MotionEvent me)
View current_view = Processor.findViewGroupWithPoint(
(int) me.getRawX(), (int) me.getRawY(), rmodel.layout.parent);
if (current_view instanceof ScrollView) {
switch( me.getAction() ){
case MotionEvent.ACTION_DOWN:
Log.d(TAG, " down");
((ScrollView) findViewById(111111)).fullScroll(View.FOCUS_DOWN);
break;
case MotionEvent.ACTION_UP:
Log.d(TAG, " up");
((ScrollView) findViewById(111111)).fullScroll(View.FOCUS_UP);
break;
}
}
我的问题是,当我向下滚动时,它可以工作,但是我必须将手指放在屏幕上,就像我移除它一样,它会回到滚动视图的顶部。
【问题讨论】:
标签: android android-edittext scrollview touch-event motionevent