I have a android native listview.now i have to hide the divider of only selected row and it's neighbour row like in the image shown follows.how i can accomplish that ?
Here my lisview code
<ListView
android:id="@+id/listView_errors"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:divider="@drawable/list_divider_complaint"
android:dividerHeight="1sp"
android:listSelector="@drawable/bgselected"
android:scrollbars="none" />
And the result so far
Create your custom divider view inside of your custom list item layout. Then if an item is selected, hide this custom divider view.
Style:
Custom list item: