mobile/android/base/resources/layout/tabs_panel_default.xml
author Martyn Haigh <martyn.haigh@gmail.com>
Tue, 09 Dec 2014 17:07:26 +0000
changeset 242404 447fb28e81cf49eb6f9f7575aa7e9744ae9a7ffd
parent 238739 597441df1450e04bb1a7e10800b255ecc06b07a7
child 243634 f308adc4e97cf179a797d21ec9c96fe3483aaa47
permissions -rw-r--r--
Bug 1100464 - Add back button to top left of the tabs panel. r=lucasr, a=sledru

<?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/. -->

<merge xmlns:android="http://schemas.android.com/apk/res/android"
       xmlns:gecko="http://schemas.android.com/apk/res-auto">

    <RelativeLayout android:id="@+id/tabs_panel_header"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/browser_toolbar_height">

        <view class="org.mozilla.gecko.tabs.TabsPanel$TabsPanelToolbar"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="@color/background_tabs">

            <ViewStub android:id="@+id/nav_back_stub"
                      android:layout="@layout/new_tablet_tabs_panel_back_button"
                      android:layout_width="wrap_content"
                      android:layout_height="match_parent"/>

            <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:layout="@layout/tabs_panel_indicator"/>

            <View android:layout_width="0dip"
                  android:layout_height="match_parent"
                  android:layout_weight="1.0"/>

            <ImageButton android:id="@+id/add_tab"
                         style="@style/UrlBar.ImageButton"
                         android:padding="@dimen/browser_toolbar_button_padding"
                         android:src="@drawable/tab_new_level"
                         android:contentDescription="@string/new_tab"
                         android:background="@drawable/action_bar_button_inverse"/>

            <ImageButton android:id="@+id/menu"
                         style="@style/UrlBar.ImageButton"
                         android:padding="@dimen/browser_toolbar_button_padding"
                         android:src="@drawable/menu_tabs"
                         android:contentDescription="@string/menu"
                         android:background="@drawable/action_bar_button_inverse"
                         android:visibility="gone"/>

        </view>

        <View android:layout_width="match_parent"
              android:layout_height="2dp"
              android:layout_alignParentBottom="true"
              android:background="#1A000000"/>

    </RelativeLayout>

    <view class="org.mozilla.gecko.tabs.TabsPanel$TabsLayoutContainer"
          android:id="@+id/tabs_container"
          android:layout_width="match_parent"
          android:layout_height="wrap_content">

        <view class="org.mozilla.gecko.tabs.TabsPanel$TabsLayout"
              android:id="@+id/normal_tabs"
              style="@style/TabsLayout"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:choiceMode="singleChoice"
              android:visibility="gone"
              gecko:tabs="tabs_normal"/>

        <org.mozilla.gecko.tabs.PrivateTabsPanel
                android:id="@+id/private_tabs_panel"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:visibility="gone"/>

    </view>

    <!-- To preserve the ID, even when building for pre-11. -->
    <RelativeLayout android:id="@+id/tabs_panel_footer"
                    android:layout_height="0dp"
                    android:layout_width="0dp"
                    android:visibility="gone"/>
</merge>