зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1200619 - Implement back button to mobile tabs tray; r=mcomella
--HG-- rename : mobile/android/base/resources/drawable-large-hdpi-v11/tabs_panel_nav_back.png => mobile/android/base/resources/drawable-hdpi/tabs_panel_nav_back.png rename : mobile/android/base/resources/drawable-large-xhdpi-v11/tabs_panel_nav_back.png => mobile/android/base/resources/drawable-xhdpi/tabs_panel_nav_back.png rename : mobile/android/base/resources/drawable-large-xxhdpi-v11/tabs_panel_nav_back.png => mobile/android/base/resources/drawable-xxhdpi/tabs_panel_nav_back.png extra : commitid : 8wLPMAHvhUz extra : rebase_source : f74014cedf9571b39f63bb8a63dfb9e09e836848 extra : amend_source : 8f12104f729701903a3fd4f5f5a034b97f5be938
This commit is contained in:
Родитель
29138d083f
Коммит
11be52924c
До Ширина: | Высота: | Размер: 453 B После Ширина: | Высота: | Размер: 453 B |
До Ширина: | Высота: | Размер: 589 B После Ширина: | Высота: | Размер: 589 B |
До Ширина: | Высота: | Размер: 816 B После Ширина: | Высота: | Размер: 816 B |
|
@ -1,17 +0,0 @@
|
|||
<?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/. -->
|
||||
|
||||
<org.mozilla.gecko.tabs.TabPanelBackButton xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:gecko="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/nav_back"
|
||||
android:layout_width="@dimen/tabs_panel_button_width"
|
||||
android:layout_height="match_parent"
|
||||
android:minWidth="@dimen/tabs_panel_button_width"
|
||||
android:src="@drawable/tabs_panel_nav_back"
|
||||
android:contentDescription="@string/back"
|
||||
android:background="@drawable/action_bar_button_inverse"
|
||||
gecko:dividerVerticalPadding="@dimen/tablet_tab_panel_divider_vertical_padding"
|
||||
gecko:rightDivider="@drawable/tab_indicator_divider"/>
|
||||
|
|
@ -18,17 +18,22 @@
|
|||
android:layout_height="@dimen/browser_toolbar_height"
|
||||
android:background="@color/text_and_tabs_tray_grey">
|
||||
|
||||
<ViewStub android:id="@+id/nav_back_stub"
|
||||
android:layout="@layout/tabs_panel_back_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
<org.mozilla.gecko.tabs.TabPanelBackButton android:id="@+id/nav_back"
|
||||
android:layout_width="@dimen/tabs_panel_button_width"
|
||||
android:layout_height="match_parent"
|
||||
android:minWidth="@dimen/tabs_panel_button_width"
|
||||
android:src="@drawable/tabs_panel_nav_back"
|
||||
android:contentDescription="@string/back"
|
||||
android:background="@drawable/action_bar_button_inverse"
|
||||
gecko:dividerVerticalPadding="@dimen/tab_panel_divider_vertical_padding"
|
||||
gecko:rightDivider="@drawable/tab_indicator_divider"/>
|
||||
|
||||
<org.mozilla.gecko.widget.IconTabWidget android:id="@+id/tab_widget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:tabStripEnabled="false"
|
||||
android:divider="@drawable/tab_indicator_divider"
|
||||
android:dividerPadding="@dimen/tablet_tab_panel_divider_vertical_padding"
|
||||
android:dividerPadding="@dimen/tab_panel_divider_vertical_padding"
|
||||
android:layout="@layout/tabs_panel_indicator"/>
|
||||
|
||||
<View android:layout_width="0dip"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<!-- This is the system default for the vertical padding for the divider of the TabWidget.
|
||||
Used to mimic the divider padding on the tablet tabs panel back button. -->
|
||||
<dimen name="tablet_tab_panel_divider_vertical_padding">12dp</dimen>
|
||||
<dimen name="tab_panel_divider_vertical_padding">12dp</dimen>
|
||||
|
||||
<dimen name="tablet_tab_strip_height">48dp</dimen>
|
||||
<dimen name="tablet_tab_strip_item_width">208dp</dimen>
|
||||
|
|
|
@ -9,5 +9,4 @@
|
|||
for the resource ID to be found (and thus compilation to succeed), we
|
||||
provide dummy values below. -->
|
||||
<item type="layout" name="tab_strip">@null</item>
|
||||
<item type="layout" name="tabs_panel_back_button">@null</item>
|
||||
</resources>
|
|
@ -161,9 +161,7 @@ public class TabsPanel extends LinearLayout
|
|||
}
|
||||
});
|
||||
|
||||
if (HardwareUtils.isTablet()) {
|
||||
ViewStub backButtonStub = (ViewStub) findViewById(R.id.nav_back_stub);
|
||||
mNavBackButton = (ImageButton) backButtonStub.inflate( );
|
||||
mNavBackButton = (ImageButton) findViewById(R.id.nav_back);
|
||||
mNavBackButton.setOnClickListener(new Button.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
@ -171,7 +169,6 @@ public class TabsPanel extends LinearLayout
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void showMenu() {
|
||||
final Menu menu = mPopupMenu.getMenu();
|
||||
|
|
Загрузка…
Ссылка в новой задаче