After disabling certain items in the listview, the divider disappears. How do I make my divider visible?
For reference, I found that the solution says override the areAllItemsEnabled of the adapter and return true. But It doesn't work.
@Override
public boolean isEnabled(int position) {
if (position == 1) {
return false;
}
return true;
}
@Override
public boolean areAllItemsEnabled() {
return true;
}
My ListView is just like below.
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:fastScrollEnabled="true"
android:horizontalSpacing="@dimen/list_item_padding_horizontal"
android:listSelector="@drawable/default_list_item_selector"
android:scrollbars="vertical"
android:stretchMode="columnWidth"
android:verticalSpacing="@dimen/list_item_padding_vertical" />
Please help me.