diff --git a/mobile/android/base/BrowserApp.java b/mobile/android/base/BrowserApp.java index 3d87891c2bf5..bfe9e6eebe84 100644 --- a/mobile/android/base/BrowserApp.java +++ b/mobile/android/base/BrowserApp.java @@ -1788,7 +1788,7 @@ public class BrowserApp extends GeckoApp mTabsPanel.prepareTabsAnimation(mMainLayoutAnimator); mBrowserToolbar.triggerTabsPanelTransition(mMainLayoutAnimator, areTabsShown()); - // If the tabs layout is animating onto the screen, pin the dynamic + // If the tabs panel is animating onto the screen, pin the dynamic // toolbar. if (mDynamicToolbar.isEnabled()) { if (width > 0 && height > 0) { @@ -2376,7 +2376,7 @@ public class BrowserApp extends GeckoApp } /** - * Hides certain UI elements (e.g. button toast, tabs tray) when the + * Hides certain UI elements (e.g. button toast, tabs panel) when the * user touches the main layout. */ private class HideOnTouchListener implements TouchEventInterceptor { @@ -2412,7 +2412,7 @@ public class BrowserApp extends GeckoApp return false; } - // If the tab tray is showing, hide the tab tray and don't send the event to content. + // If the tabs panel is showing, hide the tab panel and don't send the event to content. if (event.getActionMasked() == MotionEvent.ACTION_DOWN && autoHideTabs()) { mIsHidingTabs = true; return true; diff --git a/mobile/android/base/RemoteTabsExpandableListAdapter.java b/mobile/android/base/RemoteTabsExpandableListAdapter.java index 0deccfa1dfaf..da4060513b6f 100644 --- a/mobile/android/base/RemoteTabsExpandableListAdapter.java +++ b/mobile/android/base/RemoteTabsExpandableListAdapter.java @@ -128,7 +128,7 @@ public class RemoteTabsExpandableListAdapter extends BaseExpandableListAdapter { lastModifiedView.setText(TabsAccessor.getLastSyncedString(context, now, client.lastModified)); // These views exists only in some of our group views: they are present - // for the home panel groups and not for the tabs tray groups. + // for the home panel groups and not for the tabs panel groups. // Therefore, we must handle null. final ImageView deviceTypeView = (ImageView) view.findViewById(R.id.device_type); if (deviceTypeView != null) { @@ -174,7 +174,7 @@ public class RemoteTabsExpandableListAdapter extends BaseExpandableListAdapter { final RemoteTab tab = client.tabs.get(childPosition); // The view is a TwoLinePageRow only for some of our child views: it's - // present for the home panel children and not for the tabs tray + // present for the home panel children and not for the tabs panel // children. Therefore, we must handle one case manually. if (view instanceof TwoLinePageRow) { ((TwoLinePageRow) view).update(tab.title, tab.url); diff --git a/mobile/android/base/resources/layout-large-land-v11/tabs_panel_sidebar.xml b/mobile/android/base/resources/layout-large-land-v11/tabs_panel_sidebar.xml index 8a892389e2e4..d3dd091c3430 100644 --- a/mobile/android/base/resources/layout-large-land-v11/tabs_panel_sidebar.xml +++ b/mobile/android/base/resources/layout-large-land-v11/tabs_panel_sidebar.xml @@ -33,7 +33,7 @@ - - - - diff --git a/mobile/android/base/resources/values-large-land-v11/styles.xml b/mobile/android/base/resources/values-large-land-v11/styles.xml index b4c0aaa00e23..3850b6489e87 100644 --- a/mobile/android/base/resources/values-large-land-v11/styles.xml +++ b/mobile/android/base/resources/values-large-land-v11/styles.xml @@ -5,7 +5,7 @@ - diff --git a/mobile/android/base/resources/values-large-v11/styles.xml b/mobile/android/base/resources/values-large-v11/styles.xml index 36ecfd8a6a61..71398d37b6e8 100644 --- a/mobile/android/base/resources/values-large-v11/styles.xml +++ b/mobile/android/base/resources/values-large-v11/styles.xml @@ -50,7 +50,7 @@ horizontal - diff --git a/mobile/android/base/resources/values-v11/styles.xml b/mobile/android/base/resources/values-v11/styles.xml index a15b1e03e38f..8a99ada2a553 100644 --- a/mobile/android/base/resources/values-v11/styles.xml +++ b/mobile/android/base/resources/values-v11/styles.xml @@ -51,8 +51,8 @@ showHome|homeAsUp|showTitle - - diff --git a/mobile/android/base/resources/values/attrs.xml b/mobile/android/base/resources/values/attrs.xml index a61dcb516ecd..3e5926556799 100644 --- a/mobile/android/base/resources/values/attrs.xml +++ b/mobile/android/base/resources/values/attrs.xml @@ -98,7 +98,7 @@ - + diff --git a/mobile/android/base/resources/values/dimens.xml b/mobile/android/base/resources/values/dimens.xml index 985d23dfbd8f..1ef95e631ae5 100644 --- a/mobile/android/base/resources/values/dimens.xml +++ b/mobile/android/base/resources/values/dimens.xml @@ -109,7 +109,7 @@ 100dp 18dp 1dp - 156dp + 156dp 47dp 58dp 11dp diff --git a/mobile/android/base/resources/values/styles.xml b/mobile/android/base/resources/values/styles.xml index 83237f65401b..6f096905ebba 100644 --- a/mobile/android/base/resources/values/styles.xml +++ b/mobile/android/base/resources/values/styles.xml @@ -480,13 +480,13 @@ 0.0 - - - @@ -615,15 +615,15 @@ true - - - - diff --git a/mobile/android/base/tabs/PrivateTabsPanel.java b/mobile/android/base/tabs/PrivateTabsPanel.java index aa20ee4b3ef1..e874c0c8a7ff 100644 --- a/mobile/android/base/tabs/PrivateTabsPanel.java +++ b/mobile/android/base/tabs/PrivateTabsPanel.java @@ -33,7 +33,7 @@ class PrivateTabsPanel extends FrameLayout implements CloseAllPanelView { super(context, attrs); LayoutInflater.from(context).inflate(R.layout.private_tabs_panel, this); - tabsLayout = (TabsLayout) findViewById(R.id.private_tabs_tray); + tabsLayout = (TabsLayout) findViewById(R.id.private_tabs_layout); final View emptyView = findViewById(R.id.private_tabs_empty); tabsLayout.setEmptyView(emptyView); diff --git a/mobile/android/base/tabs/TabsGridLayout.java b/mobile/android/base/tabs/TabsGridLayout.java index 37835c065ccf..a35405f2ecc4 100644 --- a/mobile/android/base/tabs/TabsGridLayout.java +++ b/mobile/android/base/tabs/TabsGridLayout.java @@ -47,8 +47,8 @@ class TabsGridLayout extends GridView super(context, attrs, R.attr.tabGridLayoutViewStyle); mContext = context; - TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TabsTray); - mIsPrivate = (a.getInt(R.styleable.TabsTray_tabs, 0x0) == 1); + TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TabsLayout); + mIsPrivate = (a.getInt(R.styleable.TabsLayout_tabs, 0x0) == 1); a.recycle(); mTabsAdapter = new TabsGridLayoutAdapter(mContext); diff --git a/mobile/android/base/tabs/TabsListLayout.java b/mobile/android/base/tabs/TabsListLayout.java index 326b6c41eb9d..86034515ce62 100644 --- a/mobile/android/base/tabs/TabsListLayout.java +++ b/mobile/android/base/tabs/TabsListLayout.java @@ -65,8 +65,8 @@ class TabsListLayout extends TwoWayView setItemsCanFocus(true); - TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TabsTray); - mIsPrivate = (a.getInt(R.styleable.TabsTray_tabs, 0x0) == 1); + TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TabsLayout); + mIsPrivate = (a.getInt(R.styleable.TabsLayout_tabs, 0x0) == 1); a.recycle(); mTabsAdapter = new TabsListLayoutAdapter(mContext); diff --git a/mobile/android/base/tabs/TabsPanel.java b/mobile/android/base/tabs/TabsPanel.java index 08d1aad61bc9..3a0bd4ef7ca7 100644 --- a/mobile/android/base/tabs/TabsPanel.java +++ b/mobile/android/base/tabs/TabsPanel.java @@ -83,7 +83,7 @@ public class TabsPanel extends LinearLayout private final GeckoApp mActivity; private final LightweightTheme mTheme; private RelativeLayout mHeader; - private PanelViewContainer mPanelsContainer; + private TabsLayoutContainer mTabsContainer; private PanelView mPanel; private PanelView mPanelNormal; private PanelView mPanelPrivate; @@ -152,7 +152,7 @@ public class TabsPanel extends LinearLayout private void initialize() { mHeader = (RelativeLayout) findViewById(R.id.tabs_panel_header); - mPanelsContainer = (PanelViewContainer) findViewById(R.id.tabs_container); + mTabsContainer = (TabsLayoutContainer) findViewById(R.id.tabs_container); mPanelNormal = (PanelView) findViewById(R.id.normal_tabs); mPanelNormal.setTabsPanel(this); @@ -279,19 +279,19 @@ public class TabsPanel extends LinearLayout return mActivity.onOptionsItemSelected(item); } - private static int getPanelsContainerHeight(PanelViewContainer panelsContainer) { - Resources resources = panelsContainer.getContext().getResources(); + private static int getTabContainerHeight(TabsLayoutContainer tabsContainer) { + Resources resources = tabsContainer.getContext().getResources(); - PanelView panelView = panelsContainer.getCurrentPanelView(); + PanelView panelView = tabsContainer.getCurrentPanelView(); if (panelView != null && !panelView.shouldExpand()) { - return resources.getDimensionPixelSize(R.dimen.tabs_tray_horizontal_height); + return resources.getDimensionPixelSize(R.dimen.tabs_layout_horizontal_height); } int actionBarHeight = resources.getDimensionPixelSize(R.dimen.browser_toolbar_height); int screenHeight = resources.getDisplayMetrics().heightPixels; Rect windowRect = new Rect(); - panelsContainer.getWindowVisibleDisplayFrame(windowRect); + tabsContainer.getWindowVisibleDisplayFrame(windowRect); int windowHeight = windowRect.bottom - windowRect.top; // The web content area should have at least 1.5x the height of the action bar. @@ -338,9 +338,8 @@ public class TabsPanel extends LinearLayout onLightweightThemeChanged(); } - // Panel View Container holds the ListView - static class PanelViewContainer extends FrameLayout { - public PanelViewContainer(Context context, AttributeSet attrs) { + static class TabsLayoutContainer extends FrameLayout { + public TabsLayoutContainer(Context context, AttributeSet attrs) { super(context, attrs); } @@ -361,7 +360,7 @@ public class TabsPanel extends LinearLayout @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { if (!GeckoAppShell.getGeckoInterface().hasTabsSideBar()) { - int heightSpec = MeasureSpec.makeMeasureSpec(getPanelsContainerHeight(PanelViewContainer.this), MeasureSpec.EXACTLY); + int heightSpec = MeasureSpec.makeMeasureSpec(getTabContainerHeight(TabsLayoutContainer.this), MeasureSpec.EXACTLY); super.onMeasure(widthMeasureSpec, heightSpec); } else { super.onMeasure(widthMeasureSpec, heightMeasureSpec); @@ -483,7 +482,7 @@ public class TabsPanel extends LinearLayout dispatchLayoutChange(getWidth(), getHeight()); } else { int actionBarHeight = mContext.getResources().getDimensionPixelSize(R.dimen.browser_toolbar_height); - int height = actionBarHeight + getPanelsContainerHeight(mPanelsContainer); + int height = actionBarHeight + getTabContainerHeight(mTabsContainer); dispatchLayoutChange(getWidth(), height); } mHeaderVisible = true; @@ -541,13 +540,13 @@ public class TabsPanel extends LinearLayout final int tabsPanelWidth = getWidth(); if (mVisible) { ViewHelper.setTranslationX(mHeader, -tabsPanelWidth); - ViewHelper.setTranslationX(mPanelsContainer, -tabsPanelWidth); + ViewHelper.setTranslationX(mTabsContainer, -tabsPanelWidth); // The footer view is only present on the sidebar, v11+. ViewHelper.setTranslationX(mFooter, -tabsPanelWidth); } final int translationX = (mVisible ? 0 : -tabsPanelWidth); - animator.attach(mPanelsContainer, PropertyAnimator.Property.TRANSLATION_X, translationX); + animator.attach(mTabsContainer, PropertyAnimator.Property.TRANSLATION_X, translationX); animator.attach(mHeader, PropertyAnimator.Property.TRANSLATION_X, translationX); animator.attach(mFooter, PropertyAnimator.Property.TRANSLATION_X, translationX); @@ -557,16 +556,16 @@ public class TabsPanel extends LinearLayout final int translationY = (mVisible ? 0 : -toolbarHeight); if (mVisible) { ViewHelper.setTranslationY(mHeader, -toolbarHeight); - ViewHelper.setTranslationY(mPanelsContainer, -toolbarHeight); - ViewHelper.setAlpha(mPanelsContainer, 0.0f); + ViewHelper.setTranslationY(mTabsContainer, -toolbarHeight); + ViewHelper.setAlpha(mTabsContainer, 0.0f); } - animator.attach(mPanelsContainer, PropertyAnimator.Property.ALPHA, mVisible ? 1.0f : 0.0f); - animator.attach(mPanelsContainer, PropertyAnimator.Property.TRANSLATION_Y, translationY); + 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); - mPanelsContainer.setLayerType(View.LAYER_TYPE_HARDWARE, null); + mTabsContainer.setLayerType(View.LAYER_TYPE_HARDWARE, null); } public void finishTabsAnimation() { @@ -575,10 +574,10 @@ public class TabsPanel extends LinearLayout } mHeader.setLayerType(View.LAYER_TYPE_NONE, null); - mPanelsContainer.setLayerType(View.LAYER_TYPE_NONE, null); + mTabsContainer.setLayerType(View.LAYER_TYPE_NONE, null); - // If the tray is now hidden, call hide() on current panel and unset it as the current panel - // to avoid hide() being called again when the tray is opened next. + // If the tabs panel is now hidden, call hide() on current panel and unset it as the current panel + // to avoid hide() being called again when the layout is opened next. if (!mVisible && mPanel != null) { mPanel.hide(); mPanel = null; diff --git a/mobile/android/base/tests/BaseTest.java b/mobile/android/base/tests/BaseTest.java index 6d4f018d8de7..82fdb7a6a85a 100644 --- a/mobile/android/base/tests/BaseTest.java +++ b/mobile/android/base/tests/BaseTest.java @@ -619,23 +619,23 @@ abstract class BaseTest extends BaseRobocopTest { /** * Gets the AdapterView of the tabs list. * - * @return List view in the tabs tray + * @return List view in the tabs panel */ - private final AdapterView getTabsList() { + private final AdapterView getTabsLayout() { Element tabs = mDriver.findElement(getActivity(), R.id.tabs); tabs.click(); return (AdapterView) getActivity().findViewById(R.id.normal_tabs); } /** - * Gets the view in the tabs tray at the specified index. + * Gets the view in the tabs panel at the specified index. * * @return View at index */ private View getTabViewAt(final int index) { final View[] childView = { null }; - final AdapterView view = getTabsList(); + final AdapterView view = getTabsLayout(); runOnUiThreadSync(new Runnable() { @Override diff --git a/mobile/android/base/tests/robocop_autophone.ini b/mobile/android/base/tests/robocop_autophone.ini index 57bc20ff76d5..df90138c1490 100644 --- a/mobile/android/base/tests/robocop_autophone.ini +++ b/mobile/android/base/tests/robocop_autophone.ini @@ -66,7 +66,7 @@ #[testTabHistory] # fails on gs2, nexus one, lg revolution, nexus s -#[testTabsTrayMenu] +#[testTabsLayoutMenu] # fails on gs2, nexus one, lg revolution, nexus s #[testThumbnails] diff --git a/mobile/android/base/widget/IconTabWidget.java b/mobile/android/base/widget/IconTabWidget.java index 0e8ff1ce9762..579f819f4de6 100644 --- a/mobile/android/base/widget/IconTabWidget.java +++ b/mobile/android/base/widget/IconTabWidget.java @@ -83,7 +83,7 @@ public class IconTabWidget extends TabWidget { if (!mIsIcon) { return null; } - // We can have multiple views in the tray for each child. This finds the + // We can have multiple views in the tabs panel for each child. This finds the // first view corresponding to the given tab. This varies by Android // version. The first view should always be our ImageButton, but let's // be safe. @@ -98,7 +98,7 @@ public class IconTabWidget extends TabWidget { if (!mIsIcon) { return; } - // We can have multiple views in the tray for each child. This finds the + // We can have multiple views in the tabs panel for each child. This finds the // first view corresponding to the given tab. This varies by Android // version. The first view should always be our ImageButton, but let's // be safe.