2

I have an XML with a hierarchy like such:

|- Relative Layout
   |----> TextView
   |----> TextView
   |----> Gallery
   |----> Sliding Drawer
          |----> Button (handle for Sliding Drawer)
          |----> ScrollView
                 |----> LinearLayout
                 |----> TextView
                 |----> TextView
                 |----> TextView
                 |----> TextView
                 |----> TextView
                 |----> TextView
                 |----> TextView
                 |----> TextView
                 |----> TextView
                 |----> TextView
                 |----> TextView

But when I toggle the handle (to expand the SlidingDrawer), then attempt to scroll the ScrollView, it doesn't scroll despite the content being properly displayed. What am I doing wrong?

Nick Betcher
  • 2,026
  • 5
  • 19
  • 25
  • Just an update: I've tried overriding the touch event listener, setting the SlidingDrawer's 'clickable' property, and just about every variation of other questions similar to mine (Although not exact). No matter what I do, the SlidingDrawer takes focus over the child ScrollView (evidenced by overriding the onTouchEventListener and spitting out stuff in logcat for both the SlidingDrawer AND ScrollView - ScrollView's listener is never called). – Nick Betcher Nov 25 '11 at 01:42
  • did you find a solution? i have exactly the same problem... – STeN Nov 27 '11 at 20:49
  • 2
    The handle wasn't properly set. My handle ('Button') was named something else than what the SlidingDrawer had listed as the ID for 'Handle' – Nick Betcher Nov 29 '11 at 03:57

1 Answers1

3

Check that Scrollview has the id "id/content" instead of the LinearLayout

Like this:

<ScrollView
  android:id="@id/content"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent">

Also make sure that LinearLayout has the correct layout_width and layout_height set

marimaf
  • 5,382
  • 3
  • 50
  • 68