I have a listview and in its adapter according to some situations I inflate layouts. for example consider this:
if (state1){
resource = R.layout.layout_1
}else if (state2){
resource = R.layout.layout_2
}
if (convertedView == null) {
view = ((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE))
.inflate(resource, parent,false);
}
return view;
But sometimes ListView gets confused and it shows same layout for different states. I am sure there nothing wrong in code. But in ListView behavior. Any Suggestion? Thanks