Hopefully a simple one. v4.0.3
I have a ListView
and want to leave a margin of 10dip right and left.
The content is easy of course, but I want the divider line to have a 10dip margin right and left too.
If I add android:PaddingRight
or android:layout_marginRight
to the ListView
or the LinearLayout
which contains the ListView then this works of course, but the List scrollbar which appears down the right hand side as you scroll the list also moves in by the padding/margin distance.
I want the scrollbar indicator to remain.
I've tried all the android:scrollbarStyle
settings.
Can do easily
<ListView
android:id="@+id/lvDonorDetails"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="@drawable/list_divider"
android:dividerHeight="1dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:scrollbarStyle="outsideInset"/>
Or
<ListView
android:id="@+id/lvDonorDetails"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:dividerHeight="1dp"
android:padding="10dp"
android:scrollbarStyle="outsideInset"/>
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