Bug 718268: Closing tab should not shift the list. [r=mfinkle]

This commit is contained in:
Sriram Ramasubramanian 2012-02-13 16:50:09 -08:00
parent 6224f9906a
commit 0db20c4e7f

View File

@ -155,8 +155,8 @@ public class TabsTray extends Activity implements GeckoApp.OnTabsChangedListener
if (Tabs.getInstance().getIndexOf(tab) == -1) {
mWaitingForClose = false;
mTabsAdapter = new TabsAdapter(this, Tabs.getInstance().getTabsInOrder());
mList.setAdapter(mTabsAdapter);
mTabsAdapter.removeTab(tab);
mList.invalidateViews();
mListContainer.requestLayout();
} else {
View view = mList.getChildAt(position - mList.getFirstVisiblePosition());
@ -254,6 +254,10 @@ public class TabsTray extends Activity implements GeckoApp.OnTabsChangedListener
return mTabs.indexOf(tab);
}
public void removeTab(Tab tab) {
mTabs.remove(tab);
}
public void assignValues(View view, Tab tab) {
if (view == null || tab == null)
return;