gecko/mobile/android/base/TabsPanel.java

450 lines
15 KiB
Java
Raw Normal View History

Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko;
import org.mozilla.gecko.animation.PropertyAnimator;
import org.mozilla.gecko.animation.ViewHelper;
import org.mozilla.gecko.widget.IconTabWidget;
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Rect;
import android.os.Build;
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.FrameLayout;
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
public class TabsPanel extends LinearLayout
implements LightweightTheme.OnChangeListener,
IconTabWidget.OnTabChangedListener {
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
private static final String LOGTAG = "GeckoTabsPanel";
public static enum Panel {
NORMAL_TABS,
PRIVATE_TABS,
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
REMOTE_TABS
}
public static interface PanelView {
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
public ViewGroup getLayout();
public void setTabsPanel(TabsPanel panel);
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
public void show();
public void hide();
public boolean shouldExpand();
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
}
public static interface TabsLayoutChangeListener {
public void onTabsLayoutChange(int width, int height);
}
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
private Context mContext;
private final GeckoApp mActivity;
private final LightweightTheme mTheme;
private RelativeLayout mHeader;
private TabsListContainer mTabsContainer;
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
private PanelView mPanel;
private PanelView mPanelNormal;
private PanelView mPanelPrivate;
private PanelView mPanelRemote;
private RelativeLayout mFooter;
private TabsLayoutChangeListener mLayoutChangeListener;
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
private IconTabWidget mTabWidget;
private static ImageButton mAddTab;
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
private Panel mCurrentPanel;
Bug 776309: Support for 7" tablet-ish + phone-ish interface. [r=mbrubeck] --HG-- rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_back_button_bg.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_back_button_bg.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_back_button_pressed_bg.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_back_button_pressed_bg.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_texture_tablet.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_texture_tablet.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_url_default.9.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_url_default.9.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_url_pressed.9.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_url_pressed.9.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_awesomebar_go.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_awesomebar_go.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_awesomebar_search.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_awesomebar_search.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_menu_bookmark_add.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_bookmark_add.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_menu_bookmark_remove.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_bookmark_remove.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_menu_forward.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_forward.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_menu_reload.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_reload.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/reader.png => mobile/android/base/resources/drawable-large-hdpi-v11/reader.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/remote_tabs_off.png => mobile/android/base/resources/drawable-large-hdpi-v11/remote_tabs_off.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/remote_tabs_on.png => mobile/android/base/resources/drawable-large-hdpi-v11/remote_tabs_on.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/site_security_identified.png => mobile/android/base/resources/drawable-large-hdpi-v11/site_security_identified.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/site_security_verified.png => mobile/android/base/resources/drawable-large-hdpi-v11/site_security_verified.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tab_new.png => mobile/android/base/resources/drawable-large-hdpi-v11/tab_new.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/urlbar_stop.png => mobile/android/base/resources/drawable-large-hdpi-v11/urlbar_stop.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_back_button_bg.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_back_button_bg.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_back_button_pressed_bg.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_back_button_pressed_bg.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_bg.xml => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_bg.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_texture_tablet.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_texture_tablet.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_url_default.9.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_url_default.9.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_url_pressed.9.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_url_pressed.9.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_awesomebar_go.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_awesomebar_go.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_awesomebar_search.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_awesomebar_search.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_menu_bookmark_add.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_bookmark_add.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_menu_bookmark_remove.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_bookmark_remove.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_menu_forward.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_forward.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_menu_reload.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_reload.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/reader.png => mobile/android/base/resources/drawable-large-mdpi-v11/reader.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/remote_tabs_off.png => mobile/android/base/resources/drawable-large-mdpi-v11/remote_tabs_off.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/remote_tabs_on.png => mobile/android/base/resources/drawable-large-mdpi-v11/remote_tabs_on.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/site_security_identified.png => mobile/android/base/resources/drawable-large-mdpi-v11/site_security_identified.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/site_security_verified.png => mobile/android/base/resources/drawable-large-mdpi-v11/site_security_verified.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tab_new.png => mobile/android/base/resources/drawable-large-mdpi-v11/tab_new.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/urlbar_stop.png => mobile/android/base/resources/drawable-large-mdpi-v11/urlbar_stop.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_back_button_bg.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_back_button_bg.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_back_button_pressed_bg.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_back_button_pressed_bg.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_texture_tablet.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_texture_tablet.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_url_default.9.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_url_default.9.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_url_pressed.9.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_url_pressed.9.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_awesomebar_go.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_awesomebar_go.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_awesomebar_search.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_awesomebar_search.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_menu_bookmark_add.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_bookmark_add.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_menu_bookmark_remove.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_bookmark_remove.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_menu_forward.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_forward.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_menu_reload.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_reload.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/reader.png => mobile/android/base/resources/drawable-large-xhdpi-v11/reader.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/remote_tabs_off.png => mobile/android/base/resources/drawable-large-xhdpi-v11/remote_tabs_off.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/remote_tabs_on.png => mobile/android/base/resources/drawable-large-xhdpi-v11/remote_tabs_on.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/site_security_identified.png => mobile/android/base/resources/drawable-large-xhdpi-v11/site_security_identified.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/site_security_verified.png => mobile/android/base/resources/drawable-large-xhdpi-v11/site_security_verified.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tab_new.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tab_new.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/urlbar_stop.png => mobile/android/base/resources/drawable-large-xhdpi-v11/urlbar_stop.png rename : mobile/android/base/resources/layout-xlarge/doorhangerpopup.xml => mobile/android/base/resources/layout-large-v11/doorhangerpopup.xml rename : mobile/android/base/resources/layout-xlarge/site_identity_popup.xml => mobile/android/base/resources/layout-large-v11/site_identity_popup.xml rename : mobile/android/base/resources/layout-xlarge/gecko_app.xml => mobile/android/base/resources/layout-xlarge-v11/gecko_app.xml.in rename : mobile/android/base/resources/layout-xlarge/tabs_panel_toolbar_menu.xml => mobile/android/base/resources/layout-xlarge-v11/tabs_panel_toolbar_menu.xml rename : mobile/android/base/resources/layout/gecko_app.xml => mobile/android/base/resources/layout/gecko_app.xml.in rename : mobile/android/base/resources/values-xlarge/styles.xml => mobile/android/base/resources/values-xlarge-v11/styles.xml extra : rebase_source : a36dfaae46a01769dadcf2f70756f35e19f5bbe6
2012-07-23 13:08:48 -07:00
private boolean mIsSideBar;
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
private boolean mVisible;
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
public TabsPanel(Context context, AttributeSet attrs) {
super(context, attrs);
mContext = context;
mActivity = (GeckoApp) context;
mTheme = ((GeckoApplication) context.getApplicationContext()).getLightweightTheme();
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.FILL_PARENT));
setOrientation(LinearLayout.VERTICAL);
mCurrentPanel = Panel.NORMAL_TABS;
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
mVisible = false;
mIsSideBar = false;
Bug 776309: Support for 7" tablet-ish + phone-ish interface. [r=mbrubeck] --HG-- rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_back_button_bg.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_back_button_bg.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_back_button_pressed_bg.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_back_button_pressed_bg.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_texture_tablet.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_texture_tablet.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_url_default.9.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_url_default.9.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_url_pressed.9.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_url_pressed.9.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_awesomebar_go.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_awesomebar_go.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_awesomebar_search.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_awesomebar_search.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_menu_bookmark_add.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_bookmark_add.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_menu_bookmark_remove.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_bookmark_remove.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_menu_forward.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_forward.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_menu_reload.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_reload.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/reader.png => mobile/android/base/resources/drawable-large-hdpi-v11/reader.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/remote_tabs_off.png => mobile/android/base/resources/drawable-large-hdpi-v11/remote_tabs_off.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/remote_tabs_on.png => mobile/android/base/resources/drawable-large-hdpi-v11/remote_tabs_on.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/site_security_identified.png => mobile/android/base/resources/drawable-large-hdpi-v11/site_security_identified.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/site_security_verified.png => mobile/android/base/resources/drawable-large-hdpi-v11/site_security_verified.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tab_new.png => mobile/android/base/resources/drawable-large-hdpi-v11/tab_new.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/urlbar_stop.png => mobile/android/base/resources/drawable-large-hdpi-v11/urlbar_stop.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_back_button_bg.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_back_button_bg.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_back_button_pressed_bg.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_back_button_pressed_bg.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_bg.xml => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_bg.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_texture_tablet.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_texture_tablet.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_url_default.9.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_url_default.9.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_url_pressed.9.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_url_pressed.9.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_awesomebar_go.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_awesomebar_go.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_awesomebar_search.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_awesomebar_search.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_menu_bookmark_add.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_bookmark_add.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_menu_bookmark_remove.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_bookmark_remove.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_menu_forward.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_forward.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_menu_reload.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_reload.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/reader.png => mobile/android/base/resources/drawable-large-mdpi-v11/reader.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/remote_tabs_off.png => mobile/android/base/resources/drawable-large-mdpi-v11/remote_tabs_off.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/remote_tabs_on.png => mobile/android/base/resources/drawable-large-mdpi-v11/remote_tabs_on.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/site_security_identified.png => mobile/android/base/resources/drawable-large-mdpi-v11/site_security_identified.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/site_security_verified.png => mobile/android/base/resources/drawable-large-mdpi-v11/site_security_verified.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tab_new.png => mobile/android/base/resources/drawable-large-mdpi-v11/tab_new.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/urlbar_stop.png => mobile/android/base/resources/drawable-large-mdpi-v11/urlbar_stop.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_back_button_bg.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_back_button_bg.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_back_button_pressed_bg.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_back_button_pressed_bg.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_texture_tablet.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_texture_tablet.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_url_default.9.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_url_default.9.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_url_pressed.9.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_url_pressed.9.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_awesomebar_go.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_awesomebar_go.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_awesomebar_search.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_awesomebar_search.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_menu_bookmark_add.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_bookmark_add.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_menu_bookmark_remove.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_bookmark_remove.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_menu_forward.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_forward.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_menu_reload.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_reload.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/reader.png => mobile/android/base/resources/drawable-large-xhdpi-v11/reader.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/remote_tabs_off.png => mobile/android/base/resources/drawable-large-xhdpi-v11/remote_tabs_off.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/remote_tabs_on.png => mobile/android/base/resources/drawable-large-xhdpi-v11/remote_tabs_on.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/site_security_identified.png => mobile/android/base/resources/drawable-large-xhdpi-v11/site_security_identified.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/site_security_verified.png => mobile/android/base/resources/drawable-large-xhdpi-v11/site_security_verified.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tab_new.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tab_new.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/urlbar_stop.png => mobile/android/base/resources/drawable-large-xhdpi-v11/urlbar_stop.png rename : mobile/android/base/resources/layout-xlarge/doorhangerpopup.xml => mobile/android/base/resources/layout-large-v11/doorhangerpopup.xml rename : mobile/android/base/resources/layout-xlarge/site_identity_popup.xml => mobile/android/base/resources/layout-large-v11/site_identity_popup.xml rename : mobile/android/base/resources/layout-xlarge/gecko_app.xml => mobile/android/base/resources/layout-xlarge-v11/gecko_app.xml.in rename : mobile/android/base/resources/layout-xlarge/tabs_panel_toolbar_menu.xml => mobile/android/base/resources/layout-xlarge-v11/tabs_panel_toolbar_menu.xml rename : mobile/android/base/resources/layout/gecko_app.xml => mobile/android/base/resources/layout/gecko_app.xml.in rename : mobile/android/base/resources/values-xlarge/styles.xml => mobile/android/base/resources/values-xlarge-v11/styles.xml extra : rebase_source : a36dfaae46a01769dadcf2f70756f35e19f5bbe6
2012-07-23 13:08:48 -07:00
LayoutInflater.from(context).inflate(R.layout.tabs_panel, this);
initialize();
}
private void initialize() {
mHeader = (RelativeLayout) findViewById(R.id.tabs_panel_header);
mTabsContainer = (TabsListContainer) findViewById(R.id.tabs_container);
mPanelNormal = (TabsTray) findViewById(R.id.normal_tabs);
mPanelNormal.setTabsPanel(this);
mPanelPrivate = (TabsTray) findViewById(R.id.private_tabs);
mPanelPrivate.setTabsPanel(this);
mPanelRemote = (RemoteTabs) findViewById(R.id.synced_tabs);
mPanelRemote.setTabsPanel(this);
mFooter = (RelativeLayout) findViewById(R.id.tabs_panel_footer);
mAddTab = (ImageButton) findViewById(R.id.add_tab);
mAddTab.setOnClickListener(new Button.OnClickListener() {
@Override
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
public void onClick(View v) {
TabsPanel.this.addTab();
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
}
});
mTabWidget = (IconTabWidget) findViewById(R.id.tab_widget);
mTabWidget.addTab(R.drawable.tabs_normal, R.string.tabs_normal);
mTabWidget.addTab(R.drawable.tabs_private, R.string.tabs_private);
if (!GeckoProfile.get(mContext).inGuestMode()) {
mTabWidget.addTab(R.drawable.tabs_synced, R.string.tabs_synced);
}
mTabWidget.setTabSelectionListener(this);
}
public void addTab() {
if (mCurrentPanel == Panel.NORMAL_TABS)
mActivity.addTab();
else
mActivity.addPrivateTab();
mActivity.autoHideTabs();
}
@Override
public void onTabChanged(int index) {
if (index == 0)
Bug 817721/817735/817732 - New tabs tray layout with horizontal scrolling (r=mfinkle) (needs-clobber) --HG-- rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/menu.png => mobile/android/base/resources/drawable-large-hdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_menu.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_button.xml => mobile/android/base/resources/drawable-large-land-v11/tabs_button.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_level.xml => mobile/android/base/resources/drawable-large-land-v11/tabs_level.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/menu.png => mobile/android/base/resources/drawable-large-mdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_menu.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/menu.png => mobile/android/base/resources/drawable-large-xhdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_menu.png rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel.xml.in => mobile/android/base/resources/layout-large-land-v11/tabs_panel.xml.in rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel_footer.xml => mobile/android/base/resources/layout-large-land-v11/tabs_panel_footer.xml rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel_header.xml => mobile/android/base/resources/layout-large-land-v11/tabs_panel_header.xml
2013-02-21 23:23:16 -08:00
show(Panel.NORMAL_TABS, false);
else if (index == 1)
Bug 817721/817735/817732 - New tabs tray layout with horizontal scrolling (r=mfinkle) (needs-clobber) --HG-- rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/menu.png => mobile/android/base/resources/drawable-large-hdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_menu.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_button.xml => mobile/android/base/resources/drawable-large-land-v11/tabs_button.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_level.xml => mobile/android/base/resources/drawable-large-land-v11/tabs_level.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/menu.png => mobile/android/base/resources/drawable-large-mdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_menu.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/menu.png => mobile/android/base/resources/drawable-large-xhdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_menu.png rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel.xml.in => mobile/android/base/resources/layout-large-land-v11/tabs_panel.xml.in rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel_footer.xml => mobile/android/base/resources/layout-large-land-v11/tabs_panel_footer.xml rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel_header.xml => mobile/android/base/resources/layout-large-land-v11/tabs_panel_header.xml
2013-02-21 23:23:16 -08:00
show(Panel.PRIVATE_TABS, false);
else
Bug 817721/817735/817732 - New tabs tray layout with horizontal scrolling (r=mfinkle) (needs-clobber) --HG-- rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/menu.png => mobile/android/base/resources/drawable-large-hdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_menu.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_button.xml => mobile/android/base/resources/drawable-large-land-v11/tabs_button.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_level.xml => mobile/android/base/resources/drawable-large-land-v11/tabs_level.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/menu.png => mobile/android/base/resources/drawable-large-mdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_menu.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/menu.png => mobile/android/base/resources/drawable-large-xhdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_menu.png rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel.xml.in => mobile/android/base/resources/layout-large-land-v11/tabs_panel.xml.in rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel_footer.xml => mobile/android/base/resources/layout-large-land-v11/tabs_panel_footer.xml rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel_header.xml => mobile/android/base/resources/layout-large-land-v11/tabs_panel_header.xml
2013-02-21 23:23:16 -08:00
show(Panel.REMOTE_TABS, false);
}
private static int getTabContainerHeight(TabsListContainer listContainer) {
Resources resources = listContainer.getContext().getResources();
PanelView panelView = listContainer.getCurrentPanelView();
if (panelView != null && !panelView.shouldExpand()) {
return resources.getDimensionPixelSize(R.dimen.tabs_tray_horizontal_height);
}
int actionBarHeight = resources.getDimensionPixelSize(R.dimen.browser_toolbar_height);
int screenHeight = resources.getDisplayMetrics().heightPixels;
Rect windowRect = new Rect();
listContainer.getWindowVisibleDisplayFrame(windowRect);
int windowHeight = windowRect.bottom - windowRect.top;
// The web content area should have at least 1.5x the height of the action bar.
// The tabs panel shouldn't take less than 50% of the screen height and can take
// up to 80% of the window height.
return (int) Math.max(screenHeight * 0.5f,
Math.min(windowHeight - 2.5f * actionBarHeight, windowHeight * 0.8f) - actionBarHeight);
}
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
mTheme.addListener(this);
}
@Override
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
mTheme.removeListener(this);
}
@Override
public void onLightweightThemeChanged() {
final int background = getResources().getColor(R.color.background_tabs);
final LightweightThemeDrawable drawable = mTheme.getColorDrawable(this, background, true);
if (drawable == null)
return;
drawable.setAlpha(34, 0);
setBackgroundDrawable(drawable);
}
@Override
public void onLightweightThemeReset() {
setBackgroundColor(getContext().getResources().getColor(R.color.background_tabs));
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
onLightweightThemeChanged();
}
// Tabs List Container holds the ListView
public static class TabsListContainer extends FrameLayout {
public TabsListContainer(Context context, AttributeSet attrs) {
super(context, attrs);
}
public PanelView getCurrentPanelView() {
final int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
View child = getChildAt(i);
if (!(child instanceof PanelView))
continue;
if (child.getVisibility() == View.VISIBLE)
return (PanelView) child;
}
return null;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if (!GeckoAppShell.getGeckoInterface().hasTabsSideBar()) {
int heightSpec = MeasureSpec.makeMeasureSpec(getTabContainerHeight(TabsListContainer.this), MeasureSpec.EXACTLY);
super.onMeasure(widthMeasureSpec, heightSpec);
} else {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
}
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
}
// Tabs Panel Toolbar contains the Buttons
public static class TabsPanelToolbar extends LinearLayout
implements LightweightTheme.OnChangeListener {
private final LightweightTheme mTheme;
public TabsPanelToolbar(Context context, AttributeSet attrs) {
super(context, attrs);
mTheme = ((GeckoApplication) context.getApplicationContext()).getLightweightTheme();
setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,
(int) context.getResources().getDimension(R.dimen.browser_toolbar_height)));
setOrientation(LinearLayout.HORIZONTAL);
}
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
mTheme.addListener(this);
}
@Override
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
mTheme.removeListener(this);
}
@Override
public void onLightweightThemeChanged() {
final int background = getResources().getColor(R.color.background_tabs);
final LightweightThemeDrawable drawable = mTheme.getColorDrawable(this, background);
if (drawable == null)
return;
drawable.setAlpha(34, 34);
setBackgroundDrawable(drawable);
}
@Override
public void onLightweightThemeReset() {
setBackgroundColor(getContext().getResources().getColor(R.color.background_tabs));
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
onLightweightThemeChanged();
}
}
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
public void show(Panel panel) {
Bug 817721/817735/817732 - New tabs tray layout with horizontal scrolling (r=mfinkle) (needs-clobber) --HG-- rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/menu.png => mobile/android/base/resources/drawable-large-hdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_menu.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_button.xml => mobile/android/base/resources/drawable-large-land-v11/tabs_button.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_level.xml => mobile/android/base/resources/drawable-large-land-v11/tabs_level.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/menu.png => mobile/android/base/resources/drawable-large-mdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_menu.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/menu.png => mobile/android/base/resources/drawable-large-xhdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_menu.png rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel.xml.in => mobile/android/base/resources/layout-large-land-v11/tabs_panel.xml.in rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel_footer.xml => mobile/android/base/resources/layout-large-land-v11/tabs_panel_footer.xml rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel_header.xml => mobile/android/base/resources/layout-large-land-v11/tabs_panel_header.xml
2013-02-21 23:23:16 -08:00
show(panel, true);
}
public void show(Panel panel, boolean shouldResize) {
if (!isShown())
setVisibility(View.VISIBLE);
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
if (mPanel != null) {
// Hide the old panel.
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
mPanel.hide();
}
final boolean showAnimation = !mVisible;
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
mVisible = true;
mCurrentPanel = panel;
int index = panel.ordinal();
mTabWidget.setCurrentTab(index);
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
if (index == 0) {
mPanel = mPanelNormal;
} else if (index == 1) {
mPanel = mPanelPrivate;
} else {
mPanel = mPanelRemote;
}
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
mPanel.show();
if (mCurrentPanel == Panel.REMOTE_TABS) {
if (mFooter != null)
mFooter.setVisibility(View.GONE);
mAddTab.setVisibility(View.INVISIBLE);
} else {
if (mFooter != null)
mFooter.setVisibility(View.VISIBLE);
mAddTab.setVisibility(View.VISIBLE);
mAddTab.setImageLevel(index);
}
Bug 817721/817735/817732 - New tabs tray layout with horizontal scrolling (r=mfinkle) (needs-clobber) --HG-- rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/menu.png => mobile/android/base/resources/drawable-large-hdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-hdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-hdpi-v11/tabs_menu.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_button.xml => mobile/android/base/resources/drawable-large-land-v11/tabs_button.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_level.xml => mobile/android/base/resources/drawable-large-land-v11/tabs_level.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/menu.png => mobile/android/base/resources/drawable-large-mdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-mdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-mdpi-v11/tabs_menu.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/menu.png => mobile/android/base/resources/drawable-large-xhdpi-v11/menu.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_carat_contracted.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_carat_contracted.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_carat_expanded.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_carat_expanded.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi-v11/tabs_menu.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_menu.png rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel.xml.in => mobile/android/base/resources/layout-large-land-v11/tabs_panel.xml.in rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel_footer.xml => mobile/android/base/resources/layout-large-land-v11/tabs_panel_footer.xml rename : mobile/android/base/resources/layout-xlarge-v11/tabs_panel_header.xml => mobile/android/base/resources/layout-large-land-v11/tabs_panel_header.xml
2013-02-21 23:23:16 -08:00
if (shouldResize) {
if (isSideBar()) {
if (showAnimation)
dispatchLayoutChange(getWidth(), getHeight());
} else {
int actionBarHeight = mContext.getResources().getDimensionPixelSize(R.dimen.browser_toolbar_height);
int height = actionBarHeight + getTabContainerHeight(mTabsContainer);
dispatchLayoutChange(getWidth(), height);
}
}
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
}
public void hide() {
if (mVisible) {
mVisible = false;
dispatchLayoutChange(0, 0);
}
}
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
public void refresh() {
removeAllViews();
LayoutInflater.from(mContext).inflate(R.layout.tabs_panel, this);
initialize();
if (mVisible)
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
show(mCurrentPanel);
}
public void autoHidePanel() {
mActivity.autoHideTabs();
}
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
@Override
public boolean isShown() {
return mVisible;
}
Bug 776309: Support for 7" tablet-ish + phone-ish interface. [r=mbrubeck] --HG-- rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_back_button_bg.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_back_button_bg.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_back_button_pressed_bg.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_back_button_pressed_bg.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_texture_tablet.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_texture_tablet.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_url_default.9.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_url_default.9.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/address_bar_url_pressed.9.png => mobile/android/base/resources/drawable-large-hdpi-v11/address_bar_url_pressed.9.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_awesomebar_go.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_awesomebar_go.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_awesomebar_search.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_awesomebar_search.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_menu_bookmark_add.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_bookmark_add.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_menu_bookmark_remove.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_bookmark_remove.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_menu_forward.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_forward.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/ic_menu_reload.png => mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_reload.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/reader.png => mobile/android/base/resources/drawable-large-hdpi-v11/reader.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/remote_tabs_off.png => mobile/android/base/resources/drawable-large-hdpi-v11/remote_tabs_off.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/remote_tabs_on.png => mobile/android/base/resources/drawable-large-hdpi-v11/remote_tabs_on.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/site_security_identified.png => mobile/android/base/resources/drawable-large-hdpi-v11/site_security_identified.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/site_security_verified.png => mobile/android/base/resources/drawable-large-hdpi-v11/site_security_verified.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tab_new.png => mobile/android/base/resources/drawable-large-hdpi-v11/tab_new.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/urlbar_stop.png => mobile/android/base/resources/drawable-large-hdpi-v11/urlbar_stop.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_back_button_bg.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_back_button_bg.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_back_button_pressed_bg.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_back_button_pressed_bg.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_bg.xml => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_bg.xml rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_texture_tablet.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_texture_tablet.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_url_default.9.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_url_default.9.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/address_bar_url_pressed.9.png => mobile/android/base/resources/drawable-large-mdpi-v11/address_bar_url_pressed.9.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_awesomebar_go.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_awesomebar_go.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_awesomebar_search.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_awesomebar_search.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_menu_bookmark_add.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_bookmark_add.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_menu_bookmark_remove.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_bookmark_remove.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_menu_forward.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_forward.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/ic_menu_reload.png => mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_reload.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/reader.png => mobile/android/base/resources/drawable-large-mdpi-v11/reader.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/remote_tabs_off.png => mobile/android/base/resources/drawable-large-mdpi-v11/remote_tabs_off.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/remote_tabs_on.png => mobile/android/base/resources/drawable-large-mdpi-v11/remote_tabs_on.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/site_security_identified.png => mobile/android/base/resources/drawable-large-mdpi-v11/site_security_identified.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/site_security_verified.png => mobile/android/base/resources/drawable-large-mdpi-v11/site_security_verified.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tab_new.png => mobile/android/base/resources/drawable-large-mdpi-v11/tab_new.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/urlbar_stop.png => mobile/android/base/resources/drawable-large-mdpi-v11/urlbar_stop.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_back_button_bg.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_back_button_bg.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_back_button_pressed_bg.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_back_button_pressed_bg.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_texture_tablet.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_texture_tablet.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_url_default.9.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_url_default.9.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/address_bar_url_pressed.9.png => mobile/android/base/resources/drawable-large-xhdpi-v11/address_bar_url_pressed.9.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_awesomebar_go.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_awesomebar_go.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_awesomebar_search.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_awesomebar_search.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_menu_bookmark_add.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_bookmark_add.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_menu_bookmark_remove.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_bookmark_remove.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_menu_forward.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_forward.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/ic_menu_reload.png => mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_reload.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/reader.png => mobile/android/base/resources/drawable-large-xhdpi-v11/reader.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/remote_tabs_off.png => mobile/android/base/resources/drawable-large-xhdpi-v11/remote_tabs_off.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/remote_tabs_on.png => mobile/android/base/resources/drawable-large-xhdpi-v11/remote_tabs_on.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/site_security_identified.png => mobile/android/base/resources/drawable-large-xhdpi-v11/site_security_identified.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/site_security_verified.png => mobile/android/base/resources/drawable-large-xhdpi-v11/site_security_verified.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tab_new.png => mobile/android/base/resources/drawable-large-xhdpi-v11/tab_new.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/urlbar_stop.png => mobile/android/base/resources/drawable-large-xhdpi-v11/urlbar_stop.png rename : mobile/android/base/resources/layout-xlarge/doorhangerpopup.xml => mobile/android/base/resources/layout-large-v11/doorhangerpopup.xml rename : mobile/android/base/resources/layout-xlarge/site_identity_popup.xml => mobile/android/base/resources/layout-large-v11/site_identity_popup.xml rename : mobile/android/base/resources/layout-xlarge/gecko_app.xml => mobile/android/base/resources/layout-xlarge-v11/gecko_app.xml.in rename : mobile/android/base/resources/layout-xlarge/tabs_panel_toolbar_menu.xml => mobile/android/base/resources/layout-xlarge-v11/tabs_panel_toolbar_menu.xml rename : mobile/android/base/resources/layout/gecko_app.xml => mobile/android/base/resources/layout/gecko_app.xml.in rename : mobile/android/base/resources/values-xlarge/styles.xml => mobile/android/base/resources/values-xlarge-v11/styles.xml extra : rebase_source : a36dfaae46a01769dadcf2f70756f35e19f5bbe6
2012-07-23 13:08:48 -07:00
public boolean isSideBar() {
return mIsSideBar;
}
public void setIsSideBar(boolean isSideBar) {
mIsSideBar = isSideBar;
}
public Panel getCurrentPanel() {
return mCurrentPanel;
}
public void prepareTabsAnimation(PropertyAnimator animator) {
// Not worth doing this on pre-Honeycomb without proper
// hardware accelerated animations.
if (Build.VERSION.SDK_INT < 11) {
return;
}
final Resources resources = getContext().getResources();
final int toolbarHeight = resources.getDimensionPixelSize(R.dimen.browser_toolbar_height);
final int tabsPanelWidth = getWidth();
if (mVisible) {
if (mIsSideBar) {
ViewHelper.setTranslationX(mHeader, -tabsPanelWidth);
} else {
ViewHelper.setTranslationY(mHeader, -toolbarHeight);
}
if (mIsSideBar) {
ViewHelper.setTranslationX(mTabsContainer, -tabsPanelWidth);
} else {
ViewHelper.setTranslationY(mTabsContainer, -toolbarHeight);
ViewHelper.setAlpha(mTabsContainer, 0);
}
// The footer view is only present on the sidebar
if (mIsSideBar) {
ViewHelper.setTranslationX(mFooter, -tabsPanelWidth);
}
}
if (mIsSideBar) {
final int translationX = (mVisible ? 0 : -tabsPanelWidth);
animator.attach(mTabsContainer,
PropertyAnimator.Property.TRANSLATION_X,
translationX);
animator.attach(mHeader,
PropertyAnimator.Property.TRANSLATION_X,
translationX);
animator.attach(mFooter,
PropertyAnimator.Property.TRANSLATION_X,
translationX);
} else {
final int translationY = (mVisible ? 0 : -toolbarHeight);
animator.attach(mTabsContainer,
PropertyAnimator.Property.ALPHA,
mVisible ? 1.0f : 0.0f);
animator.attach(mTabsContainer,
PropertyAnimator.Property.TRANSLATION_Y,
translationY);
animator.attach(mHeader,
PropertyAnimator.Property.TRANSLATION_Y,
translationY);
}
mHeader.setLayerType(View.LAYER_TYPE_HARDWARE, null);
mTabsContainer.setLayerType(View.LAYER_TYPE_HARDWARE, null);
}
public void finishTabsAnimation() {
if (Build.VERSION.SDK_INT < 11) {
return;
}
mHeader.setLayerType(View.LAYER_TYPE_NONE, null);
mTabsContainer.setLayerType(View.LAYER_TYPE_NONE, null);
}
public void setTabsLayoutChangeListener(TabsLayoutChangeListener listener) {
mLayoutChangeListener = listener;
}
private void dispatchLayoutChange(int width, int height) {
if (mLayoutChangeListener != null)
mLayoutChangeListener.onTabsLayoutChange(width, height);
}
Bug 739407: Make Tabs UI tablet ready. [r=mfinkle] --HG-- rename : mobile/android/base/resources/drawable-hdpi/tabs_more.png => mobile/android/base/resources/drawable-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-land-hdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-hdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-mdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-mdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_more.png => mobile/android/base/resources/drawable-land-xhdpi-v14/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-sw600dp-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xhdpi-v11/tabs_more.png => mobile/android/base/resources/drawable-xhdpi-v11/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-hdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-hdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-mdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-mdpi/tabs_carat.png rename : mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_more.png => mobile/android/base/resources/drawable-xlarge-xhdpi/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_more.png => mobile/android/base/resources/drawable/tabs_carat.png rename : mobile/android/base/resources/drawable/tabs_tray_list_selector.xml => mobile/android/base/resources/drawable/tabs_tray_default_selector.xml
2012-06-07 21:47:22 -07:00
}