文本滚动内部线性布局的edittext,在android中的scrollview中

use*_*995 1 android scrollbar android-edittext

我有一个UI问题,有些EditText是在LinearLayout,并且这个线性布局放在滚动视图中.现在我要做的是编辑文本有大量的数据用于查看我已设置android:scrollbars ="vertical" 的数据我能够看到编辑文本内的滚动条但数据不滚动.外面scrollbar正在动作如何解决这个问题.

有谁能够帮我.提前致谢.

Atu*_*waj 6

这可能对你有所帮助....

parentScrollView.setOnTouchListener(new View.OnTouchListener() {

                    public boolean onTouch(View v, MotionEvent event) {
                        Log.v(TAG,"PARENT TOUCH");
                        findViewById(R.id.child_scroll).getParent().requestDisallowInterceptTouchEvent(false);
                        return false;
                    }
                });
                childScrollView.setOnTouchListener(new View.OnTouchListener() {

                    public boolean onTouch(View v, MotionEvent event)
                    {
                        Log.v(TAG,"CHILD TOUCH");
                         //  Disallow the touch request for parent scroll on touch of child view
                        v.getParent().requestDisallowInterceptTouchEvent(true);
                        return false;
                    }
                });
Run Code Online (Sandbox Code Playgroud)

在你的情况下,'parentScrollView'是你的scrollView,而childScrollView是你的Linearlayout/EditText