I am programatically adding custom views to a vertical LinearLayout, and I would like there to be some space between the views. I have tried adding: setPadding(0, 1, 0, 1)
Since API Level 14 you can just add a (transparent) divider drawable:
android:divider="@drawable/divider" android:showDividers="middle"
and it will handle the rest for you!