I've got a fragment with categories:
When one of the categories is pressed, a list with stories is opened. The fragment of categories is replaced by a fragment with list:
And now is the main part. As a background for listview items I don't use 9-patch resource, because background has difficult texture, that can't be streched, but can be repeated.
I set a divider to null and it's height to 0 (I did it either in code and xml).
mList.setDivider(null);
mList.setDividerHeight(0);
But when I press back button I saw a list with categories for a while in space between list items:
Then I try to do a red background 1 px height and set it to listview:
mList.setDivider(getResources().getDrawable(R.drawable.sep));
mList.setDividerHeight(1);
But got the same result:
I try to use 9-patch resource and there is no such bug. How can I use NOT 9-patch resource (I've already explained a reason higher) and avoid this problem?