Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Set spacing to left of scrollbar in gridview

I have a grid view with scroll bars permanently displayed. When i set the android:paddingRight property (of the GridView) to say 10dip the vertical scroll bar is shifted to the left as well.

I don't want the scroll bar to shift to the left, i purely want extra white space between the scroll bar and the grid views tiled elements.

Not to say that this isn't expected behaviour, but is there a way of adding space to the left of scroll bar without having to either:

  • Specify custom drawables for the scrollbar elements.
  • Add the spacing to the Grid Views tiles (i.e my custom layouts).

Android 2.2.

like image 464
Emile Avatar asked Nov 08 '10 14:11

Emile


1 Answers

Ah found that the following controls the behaviour i was looking to control.

<GridView 
android:scrollbarStyle="outsideInset"
/>
like image 199
Emile Avatar answered Sep 16 '22 18:09

Emile