tags:

views:

497

answers:

3

I have a TableLayout which is in a ScrollView, so I get vertical scroll. But when the columns exceed the screen with, I want the horizontal scroll also.

How can I do this? Please help.

Thanks, Farha

A: 

I would have a go with:

android:scrollbars="horizontal"

in your xml definition of the view, however if you are using a scrollview, it does not support horizontal scrolling, so the bar won't display...

Sephy
not working this way...
Amit
As I said, if you are using a ScrollView It won't work because It is not supported. look at the android doc and you will see that only vertical scroll is defined in methods:http://developer.android.com/intl/fr/reference/android/widget/ScrollView.htmlSo you have to change your View container for a linearlayout for instance
Sephy
A: 

put attribute in scroll view tag.

android:scrollbars="horizontal"
Praveen Chandrasekaran
I think scrollview does not support horizontal scroll bar, see here http://groups.google.com/group/android-developers/browse_thread/thread/d675b7ed8ea72091
Sephy
if u need access both scrollbars use pipe(|) between that. android:scrollbars="horizontal|vertical"
Praveen Chandrasekaran
the pipe method does not seem to work...
Amit
yeah this method does not work. as I said before, horizontal scrolling is not supported by scrollview. if you wnt to set horizontal scroll, you need to use HorizontalScroll view, but then you don't have vertical scroll at the same time.
Sephy
A: 

horizontalscrollview http://developer.android.com/reference/android/widget/HorizontalScrollView.html was added in 1.5

dweebo