Reputation: 7937
I'm using a TableLayout for an Activity and if I have more than a certain number of TableRows a vertical line appears to the right of the screen.
alt text http://dl.dropbox.com/u/5342899/device.png
If I use fewer Views in my layout, the line disappears. If this is not a bug, where should I look in my layout for problems?
Upvotes: 2
Views: 269
Reputation: 286
Bear in mind that if you disable the scrollbar and intend on deploying the app on other phones - especially phones with smaller screens - you run the risk of cutting out part of the UI from users
Upvotes: 1
Reputation: 9966
The reason the line appears when you have over a certain amount of rows is because it is a ScrollBar, it means the amount of rows on your screen flow down below the visible page, the scroll bar allows the user to gesture towards the rest of the options.
In the same respect it's also why the bar disappears when there only a few rows, there's enough room for the rows to be shown correctly.
Upvotes: 2
Reputation: 10031
It is a scrollbar. It appears when your layout is longer than the screen. You can disable it on your TableLayout (android:scrollbars="none"
in XML or setVerticalScrollBarEnabled(false)
from code).
However, you shouldn't do that because if you add too much rows, the user simply won't see them.
If the scrollbar hides text, add a padding to the layout (android:padding="10dip"
).
Upvotes: 4