Bug 732901 - Use notifyDatasetChanged() to update view after modifying mTabsAdapter. r=sriram a=akeybl
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Wed, 16 May 2012 15:40:16 -0700
changeset 95829 af9be77989b64376c187a3eae6d871df9264a10f
parent 95828 349c6e3f5943dc5d8a21be5957711851e01dd706
child 95830 eeb44575b30cc296966ae2b889f807537cbab59b
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssriram, akeybl
bugs732901
milestone14.0a2
Bug 732901 - Use notifyDatasetChanged() to update view after modifying mTabsAdapter. r=sriram a=akeybl
mobile/android/base/TabsTray.java
--- a/mobile/android/base/TabsTray.java
+++ b/mobile/android/base/TabsTray.java
@@ -156,18 +156,17 @@ public class TabsTray extends GeckoActiv
 
         int position = mTabsAdapter.getPositionForTab(tab);
         if (position == -1)
             return;
 
         if (Tabs.getInstance().getIndexOf(tab) == -1) {
             mWaitingForClose = false;
             mTabsAdapter.removeTab(tab);
-            mList.invalidateViews();
-            mListContainer.requestLayout();
+            mTabsAdapter.notifyDataSetChanged();
         } else {
             View view = mList.getChildAt(position - mList.getFirstVisiblePosition());
             if (view == null)
                 return;
 
             TabRow row = (TabRow) view.getTag();
             mTabsAdapter.assignValues(row, tab);
         }
@@ -337,18 +336,10 @@ public class TabsTray extends GeckoActiv
                 row = (TabRow) convertView.getTag();
             }
 
             Tab tab = mTabs.get(position);
             assignValues(row, tab);
 
             return convertView;
         }
-
-        @Override
-        public void notifyDataSetChanged() {
-        }
-
-        @Override
-        public void notifyDataSetInvalidated() {
-        }
     }
 }