Bug 850600 - Part 1: Call hide() on TabPanel after tab tray is hidden. r=mfinkle
authorJosh Dover <gerfuls@gmail.com>
Fri, 18 Apr 2014 14:08:00 -0700
changeset 179781 1e27e759fa2c34128a1fc75e1d2f3d4e3bcd215b
parent 179760 122a4087016c9481e7ac5ebd0e5fa4222a32f878
child 179782 3224b22c0f292d61020896475e140afaf8055128
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersmfinkle
bugs850600
milestone31.0a1
Bug 850600 - Part 1: Call hide() on TabPanel after tab tray is hidden. r=mfinkle
mobile/android/base/TabsPanel.java
--- a/mobile/android/base/TabsPanel.java
+++ b/mobile/android/base/TabsPanel.java
@@ -431,16 +431,23 @@ public class TabsPanel extends LinearLay
 
     public void finishTabsAnimation() {
         if (Build.VERSION.SDK_INT < 11) {
             return;
         }
 
         mHeader.setLayerType(View.LAYER_TYPE_NONE, null);
         mTabsContainer.setLayerType(View.LAYER_TYPE_NONE, null);
+
+        // If the tray is now hidden, call hide() on current panel and unset it as the current panel
+        // to avoid hide() being called again when the tray is opened next.
+        if (!mVisible && mPanel != null) {
+            mPanel.hide();
+            mPanel = null;
+        }
     }
 
     public void setTabsLayoutChangeListener(TabsLayoutChangeListener listener) {
         mLayoutChangeListener = listener;
     }
 
     private void dispatchLayoutChange(int width, int height) {
         if (mLayoutChangeListener != null)