Android scrollview inside another scrollview doesn't scroll -


I am trying to put a ScrollView inside another ScrollView and I tried the answers given on this site, But it still does not seem to work completely Android: layout_height = "wrap_content" Android: focusableInTouchMode = "false": Android: Android: Android: & gt; & Lt; LinearLayout Android: layout_width = "match_parent" Android: layout_height = "match_parent" android: orientation = "vertical" & gt; Android: Android: Android: Android: ADR = "@color / red" /> & Lt; Android: Layout = "center_vertical | center_horizontal" Android: background = "@ drawable / general_image" Android: Gravity = "Android: layout =" " Center "Android: orientation =" vertical "& gt; & Lt; / LinearLayout & gt; & Lt; ScrollView Android: id = "@ + id / scrollView2" Android: layout_width = "match_parent" Android: layout_height = "100dp" Android: Focusable InTouchMode = "false" & gt; & Lt; Android: layout_height = "wrap_content" android: layout_marginTop = "10dp" Android: autoLink = "phone" Android: text = "098 123 45 678": Android: layout_width = "wrap_content" android: id = "@ + id / textViewDirectoryDescription" Android: Text Appointment = "? Android: ATR / Text Appointment Large" /> & Lt; / Scrollview & gt;

And here is the Java code:

  parentScrollView = (ScrollView) findViewById (R.id.scrollView1); ChildScrollView = (ScrollView) findViewById (R.id.scrollView2); parentScrollView.setOnTouchListener (New View.OnTouchListener () {public boolean onTouch (See p_v, MotionEvent p_event) {childScrollView.getParent () requestDisallowInterceptTouchEvent (false) ;. // We will return false for all scroll material to follow up ;}}); childScrollView.setOnTouchListener (New View.OnTouchListener () {public boolean onTouch (p_v see, MotionEvent p_event) will not be allowed to touch {// // touch requesting child view p_v.getParent () for the parent book. requestDisallowInterceptTouchEvent ( True); the description is false;}}); // We have to follow up for all the hair scrolling materials   

What is happening: When I have a text in the text view, I do not seem to scroll it. It just scrolls up the parents but when I do not have any text and I touch the child ScrollAview it does not scroll to the parent, so I think it is working. But do you have any ideas when I have the text why does not it work?

You should use.

  & lt; Android.support.v4.widget.NestedScrollView Android: layout_width = "match_parent" android: layout_height = "wrap_content" & gt; & Lt ;! - - & gt; & Lt; /android.support.v4.widget.NestedScrollView>    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -