Only empty the view on tab change

Previously it was done when removing a limiter which caused a brief flicker
This commit is contained in:
Christopher Eby 2010-03-11 02:03:35 -06:00
parent 03821bbae5
commit 74664dbb2b
2 changed files with 9 additions and 4 deletions

View File

@ -185,14 +185,17 @@ public class MediaAdapter extends BaseAdapter implements Filterable {
}
}
public void hideAll()
{
mObjects = new ArrayList<Song>();
notifyDataSetInvalidated();
}
public void setLimiter(int field, Song media)
{
mLimiterField = field;
mLimiterMedia = media;
mObjects = new ArrayList<Song>();
notifyDataSetInvalidated();
getFilter().filter(mLastFilter);
}

View File

@ -236,8 +236,10 @@ public class SongSelector extends TabActivity implements AdapterView.OnItemClick
}
updateLimiterViews();
} else {
for (int i = data.field; i != 3; ++i)
for (int i = data.field; i != 3; ++i) {
mAdapters[i].setLimiter(data.field, data.media);
mAdapters[i].hideAll();
}
mTabHost.setCurrentTab(data.field);
}
}