I\'m trying to have a border on the outside of my listview and a different color for every other row at the same time
Rewrite
You have obviously read: How do you put a border around a ListView? since you are using the code from the better / more popular answer. But read the bottom answer as well, I had success by adding 2dp
padding (the same width as the border.)
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/border_listview"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="2dp" >
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@null"
android:dividerHeight="0dp" />
</LinearLayout>