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 | | | +------------------------+------------+----------+
Set scroll bar style as outsideInset and then add scroll bar padding to right. Save this answer.
CSS Demo: scroll-padding This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars), or to put more breathing room between a targeted element and the edges of the scrollport.
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!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With