<?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:tools="http://schemas.android.com/tools"
       xmlns:gecko="http://schemas.android.com/apk/res-auto"
       tools:layout_height="@dimen/browser_toolbar_height"
       tools:layout_width="match_parent"
       tools:parentTag="RelativeLayout">

    <ImageView
        android:id="@+id/url_bar_entry"
        style="@style/UrlBar.Entry"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/transparent"
        android:clickable="false"
        android:duplicateParentState="true"
        android:focusable="false"/>

    <org.mozilla.gecko.toolbar.BackButton
        android:id="@+id/back"
        style="@style/UrlBar.BackButton"
        android:layout_width="@dimen/tablet_nav_button_width"
        android:layout_height="@dimen/tablet_nav_button_width"
        android:layout_centerVertical="true"
        android:layout_margin="4dp"
        android:background="@drawable/url_bar_nav_button"
        android:contentDescription="@string/back"
        android:src="@drawable/ic_menu_back"
        gecko:borderColor="@color/nav_button_border_color"
        gecko:borderColorPrivate="@color/nav_button_border_color_private"/>

    <org.mozilla.gecko.toolbar.ForwardButton
        android:id="@+id/forward"
        style="@style/UrlBar.ForwardButton"
        android:layout_width="@dimen/tablet_nav_button_width_plus_half"
        android:layout_height="@dimen/tablet_nav_button_width_plus_half"
        android:layout_centerVertical="true"
        android:layout_gravity="center_vertical"
        android:background="@drawable/url_bar_forward_button"
        android:contentDescription="@string/forward"
        android:src="@drawable/ic_menu_forward"/>

    <org.mozilla.gecko.toolbar.ToolbarEditLayout
        android:id="@+id/edit_layout"
        style="@style/UrlBar.EditLayout"
        android:orientation="horizontal"
        android:visibility="gone"
        tools:visibility="visible"/>

    <!-- 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.DisplayLayout"/>

    <LinearLayout
        android:id="@+id/menu_items"
        style="@style/UrlBar.MenuItem"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:gravity="center_vertical"
        android:orientation="horizontal"/>

    <org.mozilla.gecko.toolbar.ToolbarRoundButton
        android:id="@+id/tabs"
        style="@style/UrlBar.Tabs"
        android:layout_alignWithParentIfMissing="true"
        android:background="@drawable/url_bar_action_button"
        gecko:showLWTBackground="true"/>

    <!-- In a 56x60dp space, centering 24dp image will leave 16x18dp. -->
    <org.mozilla.gecko.toolbar.TabCounter
        android:id="@+id/tabs_counter"
        style="@style/UrlBar.TabCounter"
        android:layout_alignBottom="@id/tabs"
        android:layout_alignTop="@id/tabs"
        android:gravity="center"/>

    <!-- Bug 1144707. Use clickable View instead of menu button margin to prevent
         edit mode actiivation when user clicks on the edge of the screen. -->
    <View
        android:id="@id/menu_margin"
        style="@style/UrlBar.MenuMargin"
        android:layout_width="6dp"
        android:layout_height="match_parent"
        android:clickable="true"
        android:visibility="gone"/>

    <org.mozilla.gecko.toolbar.ToolbarRoundButton
        android:id="@+id/menu"
        style="@style/UrlBar.Menu"
        android:layout_alignWithParentIfMissing="true"
        android:background="@drawable/url_bar_action_button"
        android:contentDescription="@string/menu"
        android:scaleType="center"
        android:src="@drawable/ic_overflow"
        gecko:showLWTBackground="true"/>

    <!-- 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.themed.ThemedImageView
        android:id="@+id/edit_cancel"
        style="@style/UrlBar.EditCancel"
        android:contentDescription="@string/edit_mode_cancel"
        android:src="@drawable/close_edit_mode_selector"
        android:visibility="gone"
        tools:visibility="visible"/>

</merge>
