1

Why can't setting the view's xml attribute android:scrollbars="horizontal|vertical" make LinearLayout scrollable.?

Suresh
  • 9,187
  • 14
  • 45
  • 62

2 Answers2

2

Basically, setting the view's android:scrollbars attribute makes it scrollable, but the view is not able to interpret any user feedback. In other words, the view can be scrolled with code, but not by touching the view on the device.

The ScrollView container is used because it provides a wrapper for its children objects, and propagates scroll touch events down to the children views. So to conclude, while Views are technically scrollable, only ScrollView Views have built-in touch scroll handling.

John Leehey
  • 21,128
  • 8
  • 57
  • 85
0

that thread is for TextView. In this case, ListView doesn't have setMovementMethod(new ScrollingMovementMethod()) method.

Vipin Sharma
  • 131
  • 1
  • 5