Reputation: 12018
I have a ListView where I want to put spacing/margin/padding in-between list view items and the scroll bar.
:ListView:
+------------------------+------------+----------+
|List Item 1 | | |
+------------------------+ | |
|List Item 2 |----Space---| Scroll |
+------------------------+ | Bar |
|List Item 3 | | |
+------------------------+------------+----------+
Upvotes: 32
Views: 12686
Reputation: 12018
I have found the solution:
Set scroll bar style as outsideInset
and then add scroll bar padding to right.
android:scrollbarStyle="outsideInset"
android:paddingRight="10dp"
That's it!
Upvotes: 71
Reputation: 4601
I wanted teh same with my TableLayout. Padding helped me out. For yuo it should be :
android:paddingRight="10dip"
YEs. If you add ListView in ScrollView, your listView will scroll with ScrollView.
Try this. Hopefully it will give u your desired results.
Upvotes: 2