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
|
@ -381,7 +381,10 @@ abstract public class BrowserApp extends GeckoApp
|
|||
}
|
||||
|
||||
private void updateSideBarState() {
|
||||
boolean isSideBar = GeckoAppShell.isLargeTablet();
|
||||
if (mMainLayoutAnimator != null)
|
||||
mMainLayoutAnimator.stop();
|
||||
|
||||
boolean isSideBar = (GeckoAppShell.isTablet() && mOrientation == Configuration.ORIENTATION_LANDSCAPE);
|
||||
|
||||
ViewGroup.LayoutParams lp = mTabsPanel.getLayoutParams();
|
||||
if (isSideBar) {
|
||||
|
@ -391,8 +394,36 @@ abstract public class BrowserApp extends GeckoApp
|
|||
}
|
||||
mTabsPanel.requestLayout();
|
||||
|
||||
mTabsPanel.setIsSideBar(isSideBar);
|
||||
mBrowserToolbar.setIsSideBar(isSideBar);
|
||||
final boolean changed = (mTabsPanel.isSideBar() != isSideBar);
|
||||
final boolean needsRelayout = (changed && mTabsPanel.isShown());
|
||||
|
||||
if (needsRelayout) {
|
||||
final int width;
|
||||
final int scrollY;
|
||||
|
||||
if (isSideBar) {
|
||||
width = lp.width;
|
||||
mMainLayout.scrollTo(0, 0);
|
||||
} else {
|
||||
width = 0;
|
||||
}
|
||||
|
||||
mBrowserToolbar.adjustForTabsLayout(width);
|
||||
|
||||
((LinearLayout.LayoutParams) mGeckoLayout.getLayoutParams()).setMargins(width, 0, 0, 0);
|
||||
mGeckoLayout.requestLayout();
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
// Cancel state of previous sidebar state
|
||||
mBrowserToolbar.updateTabs(false);
|
||||
|
||||
mTabsPanel.setIsSideBar(isSideBar);
|
||||
mBrowserToolbar.setIsSideBar(isSideBar);
|
||||
|
||||
// Update with new sidebar state
|
||||
mBrowserToolbar.updateTabs(mTabsPanel.isShown());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -508,7 +508,7 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
|
|||
}
|
||||
|
||||
public void fromAwesomeBarSearch() {
|
||||
if (mActivity.hasTabsSideBar() || Build.VERSION.SDK_INT < 11) {
|
||||
if (mActivity.isTablet() || Build.VERSION.SDK_INT < 11) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -623,7 +623,7 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
|
|||
|
||||
private void onAwesomeBarSearch() {
|
||||
// This animation doesn't make much sense in a sidebar UI
|
||||
if (mActivity.hasTabsSideBar() || Build.VERSION.SDK_INT < 11) {
|
||||
if (mActivity.isTablet() || Build.VERSION.SDK_INT < 11) {
|
||||
mActivity.onSearchRequested();
|
||||
return;
|
||||
}
|
||||
|
@ -823,6 +823,11 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
|
|||
setPageActionVisibility(mStop.getVisibility() == View.VISIBLE);
|
||||
}
|
||||
|
||||
public void adjustForTabsLayout(int width) {
|
||||
mTabsPaneWidth = width;
|
||||
adjustTabsAnimation(false);
|
||||
}
|
||||
|
||||
public void updateTabs(boolean areTabsShown) {
|
||||
if (areTabsShown) {
|
||||
mTabs.getBackground().setLevel(TABS_EXPANDED);
|
||||
|
@ -853,6 +858,9 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
|
|||
|
||||
public void setIsSideBar(boolean isSideBar) {
|
||||
mTabs.setIsSideBar(isSideBar);
|
||||
|
||||
mTabs.setImageResource(R.drawable.tabs_level);
|
||||
mTabs.setBackgroundResource(R.drawable.tabs_button);
|
||||
}
|
||||
|
||||
public void setProgressVisibility(boolean visible) {
|
||||
|
|
|
@ -264,13 +264,12 @@ FENNEC_PP_XML_FILES = \
|
|||
res/layout-land-v14/browser_toolbar_menu.xml \
|
||||
res/layout-large-v11/awesomebar_search.xml \
|
||||
res/layout-large-v11/browser_toolbar_menu.xml \
|
||||
res/layout-xlarge-v11/browser_toolbar_menu.xml \
|
||||
res/layout-large-land-v11/tabs_panel.xml \
|
||||
res/layout/gecko_app.xml \
|
||||
res/layout/tabs_panel.xml \
|
||||
res/layout/text_selection_handles.xml \
|
||||
res/layout-xlarge-land-v11/abouthome_content.xml \
|
||||
res/layout-xlarge-v11/awesomebar_search.xml \
|
||||
res/layout-xlarge-v11/tabs_panel.xml \
|
||||
res/xml/preferences.xml \
|
||||
res/xml/searchable.xml \
|
||||
res/menu/browser_app_menu.xml \
|
||||
|
@ -432,7 +431,8 @@ RES_LAYOUT = \
|
|||
res/layout/tabs_counter.xml \
|
||||
res/layout/tabs_panel_header.xml \
|
||||
res/layout/tabs_panel_indicator.xml \
|
||||
res/layout/tabs_row.xml \
|
||||
res/layout/tabs_item_cell.xml \
|
||||
res/layout/tabs_item_row.xml \
|
||||
res/layout/list_item_header.xml \
|
||||
res/layout/select_dialog_list.xml \
|
||||
res/layout/select_dialog_multichoice.xml \
|
||||
|
@ -449,13 +449,15 @@ RES_LAYOUT_LARGE_V11 = \
|
|||
res/layout-large-v11/site_identity_popup.xml \
|
||||
$(NULL)
|
||||
|
||||
RES_LAYOUT_LARGE_LAND_V11 = \
|
||||
res/layout-large-land-v11/tabs_panel_header.xml \
|
||||
res/layout-large-land-v11/tabs_panel_footer.xml \
|
||||
$(NULL)
|
||||
|
||||
RES_LAYOUT_XLARGE_V11 = \
|
||||
res/layout-xlarge-v11/font_size_preference.xml \
|
||||
res/layout-xlarge-v11/remote_tabs_child.xml \
|
||||
res/layout-xlarge-v11/remote_tabs_group.xml \
|
||||
res/layout-xlarge-v11/tabs_panel_header.xml \
|
||||
res/layout-xlarge-v11/tabs_panel_footer.xml \
|
||||
res/layout-xlarge-v11/tabs_row.xml \
|
||||
$(NULL)
|
||||
|
||||
RES_VALUES = \
|
||||
|
@ -465,12 +467,15 @@ RES_VALUES = \
|
|||
res/values/colors.xml \
|
||||
res/values/dimens.xml \
|
||||
res/values/integers.xml \
|
||||
res/values/layout.xml \
|
||||
res/values/styles.xml \
|
||||
res/values/themes.xml \
|
||||
$(NULL)
|
||||
|
||||
RES_VALUES_LAND = \
|
||||
res/values-land/integers.xml \
|
||||
res/values-land/layout.xml \
|
||||
res/values-land/styles.xml \
|
||||
$(NULL)
|
||||
|
||||
RES_VALUES_V11 = \
|
||||
|
@ -483,9 +488,14 @@ RES_VALUES_V11 = \
|
|||
RES_VALUES_LARGE_V11 = \
|
||||
$(SYNC_RES_VALUES_LARGE_V11) \
|
||||
res/values-large-v11/dimens.xml \
|
||||
res/values-large-v11/layout.xml \
|
||||
res/values-large-v11/styles.xml \
|
||||
$(NULL)
|
||||
|
||||
RES_VALUES_LARGE_LAND_V11 = \
|
||||
res/values-large-land-v11/styles.xml \
|
||||
$(NULL)
|
||||
|
||||
RES_VALUES_XLARGE_V11 = \
|
||||
res/values-xlarge-v11/dimens.xml \
|
||||
res/values-xlarge-v11/integers.xml \
|
||||
|
@ -889,22 +899,39 @@ RES_DRAWABLE_LAND_XHDPI_V14 = \
|
|||
res/drawable-land-xhdpi-v14/tabs_carat.png \
|
||||
$(NULL)
|
||||
|
||||
RES_DRAWABLE_LARGE_LAND_V11 = \
|
||||
res/drawable-large-land-v11/tabs_button.xml \
|
||||
res/drawable-large-land-v11/tabs_level.xml \
|
||||
$(NULL)
|
||||
|
||||
RES_DRAWABLE_LARGE_MDPI_V11 = \
|
||||
res/drawable-large-mdpi-v11/ic_menu_reload.png \
|
||||
res/drawable-large-mdpi-v11/ic_menu_forward.png \
|
||||
res/drawable-large-mdpi-v11/menu.png \
|
||||
res/drawable-large-mdpi-v11/tabs_carat.png \
|
||||
res/drawable-large-mdpi-v11/tabs_carat_contracted.png \
|
||||
res/drawable-large-mdpi-v11/tabs_carat_expanded.png \
|
||||
res/drawable-large-mdpi-v11/tabs_menu.png \
|
||||
$(NULL)
|
||||
|
||||
RES_DRAWABLE_LARGE_HDPI_V11 = \
|
||||
res/drawable-large-hdpi-v11/ic_menu_reload.png \
|
||||
res/drawable-large-hdpi-v11/ic_menu_forward.png \
|
||||
res/drawable-large-hdpi-v11/menu.png \
|
||||
res/drawable-large-hdpi-v11/tabs_carat.png \
|
||||
res/drawable-large-hdpi-v11/tabs_carat_contracted.png \
|
||||
res/drawable-large-hdpi-v11/tabs_carat_expanded.png \
|
||||
res/drawable-large-hdpi-v11/tabs_menu.png \
|
||||
$(NULL)
|
||||
|
||||
RES_DRAWABLE_LARGE_XHDPI_V11 = \
|
||||
res/drawable-large-xhdpi-v11/ic_menu_reload.png \
|
||||
res/drawable-large-xhdpi-v11/ic_menu_forward.png \
|
||||
res/drawable-large-xhdpi-v11/menu.png \
|
||||
res/drawable-large-xhdpi-v11/tabs_carat.png \
|
||||
res/drawable-large-xhdpi-v11/tabs_carat_contracted.png \
|
||||
res/drawable-large-xhdpi-v11/tabs_carat_expanded.png \
|
||||
res/drawable-large-xhdpi-v11/tabs_menu.png \
|
||||
$(NULL)
|
||||
|
||||
RES_DRAWABLE_XLARGE_MDPI_V11 = \
|
||||
|
@ -913,12 +940,6 @@ RES_DRAWABLE_XLARGE_MDPI_V11 = \
|
|||
res/drawable-xlarge-mdpi-v11/awesomebar_tab_right.9.png \
|
||||
res/drawable-xlarge-mdpi-v11/ic_menu_bookmark_add.png \
|
||||
res/drawable-xlarge-mdpi-v11/ic_menu_bookmark_remove.png \
|
||||
res/drawable-xlarge-mdpi-v11/menu.png \
|
||||
res/drawable-xlarge-mdpi-v11/tabs_button.xml \
|
||||
res/drawable-xlarge-mdpi-v11/tabs_carat_contracted.png \
|
||||
res/drawable-xlarge-mdpi-v11/tabs_carat_expanded.png \
|
||||
res/drawable-xlarge-mdpi-v11/tabs_level.xml \
|
||||
res/drawable-xlarge-mdpi-v11/tabs_menu.png \
|
||||
$(NULL)
|
||||
|
||||
RES_DRAWABLE_XLARGE_HDPI_V11 = \
|
||||
|
@ -927,10 +948,6 @@ RES_DRAWABLE_XLARGE_HDPI_V11 = \
|
|||
res/drawable-xlarge-hdpi-v11/awesomebar_tab_right.9.png \
|
||||
res/drawable-xlarge-hdpi-v11/ic_menu_bookmark_add.png \
|
||||
res/drawable-xlarge-hdpi-v11/ic_menu_bookmark_remove.png \
|
||||
res/drawable-xlarge-hdpi-v11/menu.png \
|
||||
res/drawable-xlarge-hdpi-v11/tabs_carat_contracted.png \
|
||||
res/drawable-xlarge-hdpi-v11/tabs_carat_expanded.png \
|
||||
res/drawable-xlarge-hdpi-v11/tabs_menu.png \
|
||||
$(NULL)
|
||||
|
||||
RES_DRAWABLE_XLARGE_XHDPI_V11 = \
|
||||
|
@ -939,10 +956,6 @@ RES_DRAWABLE_XLARGE_XHDPI_V11 = \
|
|||
res/drawable-xlarge-xhdpi-v11/awesomebar_tab_right.9.png \
|
||||
res/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_add.png \
|
||||
res/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_remove.png \
|
||||
res/drawable-xlarge-xhdpi-v11/menu.png \
|
||||
res/drawable-xlarge-xhdpi-v11/tabs_carat_contracted.png \
|
||||
res/drawable-xlarge-xhdpi-v11/tabs_carat_expanded.png \
|
||||
res/drawable-xlarge-xhdpi-v11/tabs_menu.png \
|
||||
$(NULL)
|
||||
|
||||
RES_COLOR = \
|
||||
|
@ -1002,12 +1015,13 @@ MOZ_BRANDING_DRAWABLE_MDPI = $(shell if test -e $(topsrcdir)/$(MOZ_BRANDING_DIRE
|
|||
MOZ_BRANDING_DRAWABLE_HDPI = $(shell if test -e $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/android-resources-hdpi.mn; then cat $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/android-resources-hdpi.mn | tr '\n' ' '; fi)
|
||||
MOZ_BRANDING_DRAWABLE_XHDPI = $(shell if test -e $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/android-resources-xhdpi.mn; then cat $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/android-resources-xhdpi.mn | tr '\n' ' '; fi)
|
||||
|
||||
RESOURCES=$(RES_LAYOUT) $(RES_LAYOUT_LARGE_V11) $(RES_LAYOUT_XLARGE_V11) $(RES_VALUES) $(RES_VALUES_LAND) $(RES_VALUES_V11) $(RES_VALUES_LARGE_V11) $(RES_VALUES_XLARGE_V11) $(RES_VALUES_LAND_V14) $(RES_XML) $(RES_ANIM) $(RES_DRAWABLE_MDPI) $(RES_DRAWABLE_LDPI) $(RES_DRAWABLE_HDPI) $(RES_DRAWABLE_XHDPI) $(RES_DRAWABLE_MDPI_V11) $(RES_DRAWABLE_HDPI_V11) $(RES_DRAWABLE_XHDPI_V11) $(RES_DRAWABLE_LAND_MDPI_V14) $(RES_DRAWABLE_LAND_HDPI_V14) $(RES_DRAWABLE_LAND_XHDPI_V14) $(RES_DRAWABLE_LARGE_MDPI_V11) $(RES_DRAWABLE_LARGE_HDPI_V11) $(RES_DRAWABLE_LARGE_XHDPI_V11) $(RES_DRAWABLE_XLARGE_MDPI_V11) $(RES_DRAWABLE_XLARGE_HDPI_V11) $(RES_DRAWABLE_XLARGE_XHDPI_V11) $(RES_COLOR) $(RES_MENU)
|
||||
RESOURCES=$(RES_LAYOUT) $(RES_LAYOUT_LARGE_LAND_V11) $(RES_LAYOUT_LARGE_V11) $(RES_LAYOUT_XLARGE_V11) $(RES_VALUES) $(RES_VALUES_LAND) $(RES_VALUES_V11) $(RES_VALUES_LARGE_V11) $(RES_VALUES_LARGE_LAND_V11) $(RES_VALUES_XLARGE_V11) $(RES_VALUES_LAND_V14) $(RES_XML) $(RES_ANIM) $(RES_DRAWABLE_MDPI) $(RES_DRAWABLE_LDPI) $(RES_DRAWABLE_HDPI) $(RES_DRAWABLE_XHDPI) $(RES_DRAWABLE_MDPI_V11) $(RES_DRAWABLE_HDPI_V11) $(RES_DRAWABLE_XHDPI_V11) $(RES_DRAWABLE_LAND_MDPI_V14) $(RES_DRAWABLE_LAND_HDPI_V14) $(RES_DRAWABLE_LAND_XHDPI_V14) $(RES_DRAWABLE_LARGE_LAND_V11) $(RES_DRAWABLE_LARGE_MDPI_V11) $(RES_DRAWABLE_LARGE_HDPI_V11) $(RES_DRAWABLE_LARGE_XHDPI_V11) $(RES_DRAWABLE_XLARGE_MDPI_V11) $(RES_DRAWABLE_XLARGE_HDPI_V11) $(RES_DRAWABLE_XLARGE_XHDPI_V11) $(RES_COLOR) $(RES_MENU)
|
||||
|
||||
RES_DIRS= \
|
||||
res/layout \
|
||||
res/layout-land-v14 \
|
||||
res/layout-large-v11 \
|
||||
res/layout-large-land-v11 \
|
||||
res/layout-xlarge-v11 \
|
||||
res/layout-xlarge-land-v11 \
|
||||
res/values \
|
||||
|
|
|
@ -152,11 +152,11 @@ public class TabsPanel extends LinearLayout
|
|||
@Override
|
||||
public void onTabChanged(int index) {
|
||||
if (index == 0)
|
||||
show(Panel.NORMAL_TABS);
|
||||
show(Panel.NORMAL_TABS, false);
|
||||
else if (index == 1)
|
||||
show(Panel.PRIVATE_TABS);
|
||||
show(Panel.PRIVATE_TABS, false);
|
||||
else
|
||||
show(Panel.REMOTE_TABS);
|
||||
show(Panel.REMOTE_TABS, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -323,6 +323,10 @@ public class TabsPanel extends LinearLayout
|
|||
}
|
||||
|
||||
public void show(Panel panel) {
|
||||
show(panel, true);
|
||||
}
|
||||
|
||||
public void show(Panel panel, boolean shouldResize) {
|
||||
if (!isShown())
|
||||
setVisibility(View.VISIBLE);
|
||||
|
||||
|
@ -363,13 +367,15 @@ public class TabsPanel extends LinearLayout
|
|||
mMenuButton.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -121,10 +121,10 @@ public class TabsTray extends TwoWayView
|
|||
TextView title;
|
||||
ImageView thumbnail;
|
||||
ImageButton close;
|
||||
LinearLayout info;
|
||||
ViewGroup info;
|
||||
|
||||
public TabRow(View view) {
|
||||
info = (LinearLayout) view;
|
||||
info = (ViewGroup) view;
|
||||
title = (TextView) view.findViewById(R.id.title);
|
||||
thumbnail = (ImageView) view.findViewById(R.id.thumbnail);
|
||||
close = (ImageButton) view.findViewById(R.id.close);
|
||||
|
|
До Ширина: | Высота: | Размер: 122 B После Ширина: | Высота: | Размер: 122 B |
До Ширина: | Высота: | Размер: 1.1 KiB После Ширина: | Высота: | Размер: 1.1 KiB |
До Ширина: | Высота: | Размер: 1.2 KiB После Ширина: | Высота: | Размер: 1.2 KiB |
До Ширина: | Высота: | Размер: 118 B После Ширина: | Высота: | Размер: 118 B |
До Ширина: | Высота: | Размер: 107 B После Ширина: | Высота: | Размер: 107 B |
До Ширина: | Высота: | Размер: 1.1 KiB После Ширина: | Высота: | Размер: 1.1 KiB |
До Ширина: | Высота: | Размер: 1.1 KiB После Ширина: | Высота: | Размер: 1.1 KiB |
До Ширина: | Высота: | Размер: 103 B После Ширина: | Высота: | Размер: 103 B |
До Ширина: | Высота: | Размер: 137 B После Ширина: | Высота: | Размер: 137 B |
До Ширина: | Высота: | Размер: 1.2 KiB После Ширина: | Высота: | Размер: 1.2 KiB |
До Ширина: | Высота: | Размер: 1.2 KiB После Ширина: | Высота: | Размер: 1.2 KiB |
До Ширина: | Высота: | Размер: 133 B После Ширина: | Высота: | Размер: 133 B |
|
@ -15,16 +15,54 @@
|
|||
<org.mozilla.gecko.BrowserToolbarBackground android:id="@+id/address_bar_bg"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginRight="77dip"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="21dip"
|
||||
gecko:curveTowards="left"
|
||||
android:background="@drawable/address_bar_bg"/>
|
||||
|
||||
<FrameLayout style="@style/AddressBar.Button"
|
||||
android:layout_toLeftOf="@id/menu_items"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerVertical="true">
|
||||
<org.mozilla.gecko.TabsButton android:id="@+id/tabs"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="84dip"
|
||||
android:layout_alignParentLeft="true"
|
||||
gecko:curveTowards="left"
|
||||
gecko:cropped="true"
|
||||
android:background="@drawable/tabs_button"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/tabs_level"
|
||||
android:paddingLeft="6dip"
|
||||
android:paddingRight="38dip"/>
|
||||
|
||||
<Gecko.TextSwitcher android:id="@+id/tabs_count"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="52dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_alignLeft="@id/tabs"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<Gecko.ImageButton android:id="@+id/menu"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="56dip"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/menu_level"
|
||||
android:contentDescription="@string/menu"
|
||||
android:background="@drawable/action_bar_button"
|
||||
android:paddingLeft="14dip"
|
||||
android:paddingRight="14dip"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<LinearLayout android:id="@+id/menu_items"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_toLeftOf="@id/menu"/>
|
||||
|
||||
<RelativeLayout style="@style/AddressBar.Button"
|
||||
android:layout_toRightOf="@id/tabs"
|
||||
android:layout_toLeftOf="@id/menu_items"
|
||||
android:layout_marginLeft="-28dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<Gecko.RelativeLayout android:id="@+id/awesome_bar"
|
||||
style="@style/AddressBar.Button"
|
||||
|
@ -32,38 +70,35 @@
|
|||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView android:id="@+id/awesome_bar_entry"
|
||||
style="@style/AddressBar.Button"
|
||||
android:duplicateParentState="true"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:layout_marginRight="0dp"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:background="@drawable/address_bar_url"/>
|
||||
<Gecko.ImageView style="@style/AddressBar.Button"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="0dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:duplicateParentState="true"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:background="@drawable/address_bar_url"/>
|
||||
|
||||
<view class="org.mozilla.gecko.BrowserToolbar$RightEdge"
|
||||
android:id="@+id/awesome_bar_right_edge"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="100dp"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingBottom="7dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:duplicateParentState="true"
|
||||
android:visibility="invisible"
|
||||
android:background="@drawable/address_bar_bg">
|
||||
android:duplicateParentState="true">
|
||||
|
||||
<ImageView android:layout_width="50dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_marginLeft="-26dp"
|
||||
android:duplicateParentState="true"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:src="@drawable/address_bar_url"/>
|
||||
<Gecko.ImageView android:layout_width="50dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_marginLeft="-26dp"
|
||||
android:duplicateParentState="true"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:src="@drawable/address_bar_url"/>
|
||||
|
||||
</view>
|
||||
|
||||
|
@ -76,8 +111,7 @@
|
|||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="50dip"
|
||||
android:layout_height="50dip"
|
||||
android:layout_marginLeft="1dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_centerVertical="true"
|
||||
android:padding="13dp"
|
||||
android:src="@drawable/ic_menu_back"
|
||||
android:contentDescription="@string/back"
|
||||
|
@ -132,46 +166,7 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<org.mozilla.gecko.MenuButton android:id="@+id/menu"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="90dip"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/menu_level"
|
||||
android:contentDescription="@string/menu"
|
||||
android:background="@drawable/menu_button"
|
||||
android:paddingLeft="48dip"
|
||||
android:paddingRight="14dip"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<org.mozilla.gecko.TabsButton android:id="@+id/tabs"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="112dip"
|
||||
android:layout_marginRight="28dip"
|
||||
android:layout_alignParentRight="true"
|
||||
gecko:curveTowards="right"
|
||||
android:background="@drawable/tabs_button"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/tabs_level"
|
||||
android:paddingLeft="42dip"
|
||||
android:paddingRight="42dip"/>
|
||||
|
||||
<Gecko.TextSwitcher android:id="@+id/tabs_count"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="112dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_alignRight="@id/tabs"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<LinearLayout android:id="@+id/menu_items"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginRight="110dip"
|
||||
android:layout_alignParentRight="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView android:id="@+id/shadow"
|
||||
android:layout_width="fill_parent"
|
||||
|
|
|
@ -1,179 +0,0 @@
|
|||
#filter substitution
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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/. -->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:gecko="http://schemas.android.com/apk/res/@ANDROID_PACKAGE_NAME@"
|
||||
android:id="@+id/browser_toolbar"
|
||||
style="@style/BrowserToolbar">
|
||||
|
||||
<RelativeLayout android:id="@+id/address_bar"
|
||||
style="@style/AddressBar">
|
||||
|
||||
<org.mozilla.gecko.BrowserToolbarBackground android:id="@+id/address_bar_bg"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
gecko:curveTowards="left"
|
||||
android:background="@drawable/address_bar_bg"/>
|
||||
|
||||
<org.mozilla.gecko.TabsButton android:id="@+id/tabs"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="84dip"
|
||||
android:layout_alignParentLeft="true"
|
||||
gecko:curveTowards="left"
|
||||
gecko:cropped="true"
|
||||
android:background="@drawable/tabs_button"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/tabs_level"
|
||||
android:paddingLeft="6dip"
|
||||
android:paddingRight="32dip"/>
|
||||
|
||||
<Gecko.TextSwitcher android:id="@+id/tabs_count"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="52dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_alignLeft="@id/tabs"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<Gecko.ImageButton android:id="@+id/menu"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="56dip"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/menu_level"
|
||||
android:contentDescription="@string/menu"
|
||||
android:background="@drawable/action_bar_button"
|
||||
android:paddingLeft="14dip"
|
||||
android:paddingRight="14dip"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<LinearLayout android:id="@+id/menu_items"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_toLeftOf="@id/menu"/>
|
||||
|
||||
<RelativeLayout style="@style/AddressBar.Button"
|
||||
android:layout_toRightOf="@id/tabs"
|
||||
android:layout_toLeftOf="@id/menu_items"
|
||||
android:layout_marginLeft="-28dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<Gecko.RelativeLayout android:id="@+id/awesome_bar"
|
||||
style="@style/AddressBar.Button"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<Gecko.ImageView style="@style/AddressBar.Button"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="0dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:duplicateParentState="true"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:background="@drawable/address_bar_url"/>
|
||||
|
||||
<view class="org.mozilla.gecko.BrowserToolbar$RightEdge"
|
||||
android:id="@+id/awesome_bar_right_edge"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingBottom="7dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:duplicateParentState="true">
|
||||
|
||||
<Gecko.ImageView android:layout_width="50dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_marginLeft="-26dp"
|
||||
android:duplicateParentState="true"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:src="@drawable/address_bar_url"/>
|
||||
|
||||
</view>
|
||||
|
||||
</Gecko.RelativeLayout>
|
||||
|
||||
<org.mozilla.gecko.ForwardButton style="@style/AddressBar.ImageButton.Forward"
|
||||
android:id="@+id/forward"/>
|
||||
|
||||
<org.mozilla.gecko.BackButton android:id="@+id/back"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="50dip"
|
||||
android:layout_height="50dip"
|
||||
android:layout_centerVertical="true"
|
||||
android:padding="13dp"
|
||||
android:src="@drawable/ic_menu_back"
|
||||
android:contentDescription="@string/back"
|
||||
android:background="@drawable/address_bar_nav_button"/>
|
||||
|
||||
<LinearLayout style="@style/AddressBar.Button.Container"
|
||||
android:id="@+id/addressbar">
|
||||
|
||||
<ImageButton android:id="@+id/favicon"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="@dimen/browser_toolbar_favicon_size"
|
||||
android:layout_height="fill_parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:paddingLeft="8dip"
|
||||
android:layout_marginRight="4dip"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/favicon"/>
|
||||
|
||||
<ImageButton android:id="@+id/site_security"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
android:layout_width="@dimen/browser_toolbar_lock_width"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_marginLeft="-4dip"
|
||||
android:src="@drawable/site_security_level"
|
||||
android:contentDescription="@string/site_security"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<Gecko.TextView android:id="@+id/awesome_bar_title"
|
||||
style="@style/AddressBar.Button"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="1.0"
|
||||
android:singleLine="true"
|
||||
android:paddingRight="8dp"
|
||||
android:textColor="@color/awesome_bar_title"
|
||||
android:textColorHint="@color/awesome_bar_title_hint"
|
||||
android:gravity="center_vertical|left"
|
||||
android:hint="@string/awesomebar_default_text"
|
||||
android:layout_gravity="center_vertical"/>
|
||||
|
||||
<ImageButton android:id="@+id/reader"
|
||||
style="@style/AddressBar.ImageButton.Icon"
|
||||
android:src="@drawable/reader"
|
||||
android:contentDescription="@string/reader"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageButton android:id="@+id/stop"
|
||||
style="@style/AddressBar.ImageButton.Icon"
|
||||
android:src="@drawable/urlbar_stop"
|
||||
android:contentDescription="@string/stop"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView android:id="@+id/shadow"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/address_bar_bg_shadow_repeat"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -30,7 +30,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="#EFFF"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_below="@id/thumbnail"
|
||||
android:duplicateParentState="true">
|
||||
|
||||
<TextView android:id="@+id/title"
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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/. -->
|
||||
|
||||
<resources>
|
||||
<item type="layout" name="tabs_row">@layout/tabs_item_cell</item>
|
||||
</resources>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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/. -->
|
||||
|
||||
<resources>
|
||||
|
||||
<style name="TabsList" parent="TabsListBase">
|
||||
<item name="android:orientation">horizontal</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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/. -->
|
||||
|
||||
<resources>
|
||||
|
||||
<style name="TabsList" parent="TabsListBase">
|
||||
<item name="android:orientation">vertical</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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/. -->
|
||||
|
||||
<resources>
|
||||
<item type="layout" name="tabs_row">@layout/tabs_item_cell</item>
|
||||
</resources>
|
|
@ -56,4 +56,8 @@
|
|||
<item name="android:orientation">horizontal</item>
|
||||
</style>
|
||||
|
||||
<style name="TabsList" parent="TabsListBase">
|
||||
<item name="android:orientation">horizontal</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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/. -->
|
||||
|
||||
<resources>
|
||||
<item type="layout" name="tabs_row">@layout/tabs_item_row</item>
|
||||
</resources>
|
|
@ -136,9 +136,12 @@
|
|||
</style>
|
||||
|
||||
<!-- TabsTray List -->
|
||||
<style name="TabsList">
|
||||
<style name="TabsListBase">
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
<item name="android:listSelector">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="TabsList" parent="TabsListBase">
|
||||
<item name="android:orientation">vertical</item>
|
||||
</style>
|
||||
|
||||
|
|