How to put padding/spacing in-between list view item and scroll bar

I have a ListView where I want to put spacing/margin/padding in-between list view items and the scroll bar.

|List Item 1             |            |          |
+------------------------+            |          |
|List Item 2             |----Space---|  Scroll  |
+------------------------+            |    Bar   |
|List Item 3             |            |          |

  • How to select a particular tile when clicked and inflate a bitmap on it in tileview android
  • Creating a system overlay where the home buttons still work?
  • Phonegap Build CLI-5.2.0 Download and Close From Within Web App
  • How to quit an application programmatically through button click
  • Degrees symbol (as in Degrees Celsius/Fahrenheit) in a TextView
  • Detecting which selected item (in a ListView) spawned the ContextMenu (Android)
  • Related posts:

    How to Shrink WebView size dynamically according to its content?
    Default value for Gradle buildConfigField boolean used across flavors
    Android default launchMode of LAUNCHER activity?
    How to find View from string instead of
    Maven build Android application - BuildConfig
    If AsyncTask is not an inner class… - some questions
  • SensorEventListener doesn't get unregistered with unregisterListener() method
  • VoIP library for Android
  • Error :- Execution failed for task ':app:dexDebug' in android studio
  • Android Button or TextView Border programmatically without using setBackgroundDrawable method
  • Android Unit Test with Retrofit and Mockito
  • Android - Launching Google Navigation from an app
  • 3 Solutions collect form web for “How to put padding/spacing in-between list view item and scroll bar”

    I have found the solution:
    Set scroll bar style as outsideInset and then add scroll bar padding to right.


    That’s it!

    I wanted teh same with my TableLayout. Padding helped me out. For yuo it should be :


    YEs. If you add ListView in ScrollView, your listView will scroll with ScrollView.

    Try this. Hopefully it will give u your desired results.

    You must use Fragments.

    1º You load your content view, with 3 vertical layouts

    2º Then, use 3 fragments that you want, in different xml, and load the content in each one.

    3º Set the margin between layouts.

    You have a good example Here

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.