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 197871 1e27e759fa2c34128a1fc75e1d2f3d4e3bcd215b
parent 197818 122a4087016c9481e7ac5ebd0e5fa4222a32f878
child 197872 3224b22c0f292d61020896475e140afaf8055128
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs850600
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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)