<?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">

    <ImageView android:id="@+id/url_bar_entry"
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:layout_alignLeft="@+id/back"
               android:layout_toLeftOf="@id/menu_items"
               android:layout_marginLeft="@dimen/new_tablet_nav_button_width_half"
               android:layout_marginTop="10dp"
               android:layout_marginBottom="10dp"
               android:duplicateParentState="true"
               android:clickable="false"
               android:focusable="false"
               android:background="@drawable/url_bar_entry"/>

    <org.mozilla.gecko.toolbar.ForwardButton style="@style/UrlBar.ImageButton.Forward.NewTablet"
                                             android:id="@+id/forward"
                                             android:layout_alignLeft="@id/back"/>

    <org.mozilla.gecko.toolbar.BackButton android:id="@id/back"
                                          style="@style/UrlBar.ImageButton.NewTablet"
                                          android:layout_width="@dimen/new_tablet_nav_button_width"
                                          android:layout_height="@dimen/new_tablet_nav_button_width"
                                          android:layout_centerVertical="true"
                                          android:layout_marginLeft="12dp"
                                          android:layout_alignParentLeft="true"
                                          android:src="@drawable/new_tablet_ic_menu_back"
                                          android:contentDescription="@string/back"
                                          android:background="@drawable/new_tablet_url_bar_nav_button"/>

    <org.mozilla.gecko.toolbar.ToolbarEditLayout android:id="@+id/edit_layout"
                  style="@style/UrlBar.Button"
                  android:paddingLeft="12dp"
                  android:paddingRight="12dp"
                  android:visibility="gone"
                  android:orientation="horizontal"
                  android:layout_toRightOf="@id/back"
                  android:layout_toLeftOf="@id/menu_items"/>

    <!-- Note: we set the padding on the site security icon to increase its tappable area. -->
    <org.mozilla.gecko.toolbar.ToolbarDisplayLayout android:id="@+id/display_layout"
                  style="@style/UrlBar.Button.Container"
                  android:layout_toRightOf="@id/back"
                  android:layout_toLeftOf="@id/menu_items"
                  android:paddingRight="4dip"/>

    <LinearLayout android:id="@+id/menu_items"
                  android:layout_width="wrap_content"
                  android:layout_height="match_parent"
                  android:gravity="center_vertical"
                  android:layout_marginLeft="6dp"
                  android:orientation="horizontal"
                  android:layout_toLeftOf="@id/tabs"/>

    <org.mozilla.gecko.widget.ThemedImageButton
            android:id="@+id/tabs"
            style="@style/UrlBar.ImageButton.NewTablet"
            android:layout_toLeftOf="@id/menu"
            android:layout_alignWithParentIfMissing="true"
            android:background="@drawable/new_tablet_action_bar_button"/>

    <!-- In a 56x60dp space, centering 24dp image will leave 16x18dp. -->
    <org.mozilla.gecko.toolbar.TabCounter android:id="@+id/tabs_counter"
                        style="@style/UrlBar.ImageButton.TabCount.NewTablet"
                        android:layout_alignLeft="@id/tabs"
                        android:layout_alignRight="@id/tabs"
                        android:layout_alignTop="@id/tabs"
                        android:layout_alignBottom="@id/tabs"
                        android:layout_marginTop="18dp"
                        android:layout_marginBottom="18dp"
                        android:layout_marginLeft="16dp"
                        android:layout_marginRight="16dp"
                        android:layout="@layout/new_tablet_tabs_counter"/>

    <org.mozilla.gecko.widget.ThemedImageButton
            android:id="@+id/menu"
            style="@style/UrlBar.ImageButton.NewTablet"
            android:layout_alignParentRight="true"
            android:contentDescription="@string/menu"
            android:background="@drawable/new_tablet_action_bar_button"
            android:visibility="gone"/>

    <org.mozilla.gecko.widget.ThemedImageView
            android:id="@+id/menu_icon"
            style="@style/UrlBar.ImageButton.NewTablet"
            android:layout_alignLeft="@id/menu"
            android:layout_alignRight="@id/menu"
            android:src="@drawable/new_tablet_menu"
            android:visibility="gone"/>

    <!-- We draw after the menu items so when they are hidden, the cancel button,
         which is thus drawn on top, may be pressed. -->
    <org.mozilla.gecko.widget.ThemedImageView
            android:id="@+id/edit_cancel"
            style="@style/UrlBar.ImageButton.Icon"
            android:layout_alignParentRight="true"
            android:src="@drawable/close_edit_mode_selector"
            android:contentDescription="@string/edit_mode_cancel"
            android:visibility="gone"/>

</merge>
