summaryrefslogtreecommitdiffstats
path: root/mobile/android/base/resources/layout/browser_toolbar.xml
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /mobile/android/base/resources/layout/browser_toolbar.xml
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'mobile/android/base/resources/layout/browser_toolbar.xml')
-rw-r--r--mobile/android/base/resources/layout/browser_toolbar.xml112
1 files changed, 112 insertions, 0 deletions
diff --git a/mobile/android/base/resources/layout/browser_toolbar.xml b/mobile/android/base/resources/layout/browser_toolbar.xml
new file mode 100644
index 000000000..0413215f8
--- /dev/null
+++ b/mobile/android/base/resources/layout/browser_toolbar.xml
@@ -0,0 +1,112 @@
+<?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">
+
+ <!-- Note: any layout parameters setting the right edge of
+ this View should be matched in the url_bar_translating_edge. -->
+ <ImageView android:id="@+id/url_bar_entry"
+ style="@style/UrlBar.Button"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="-6dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:layout_toLeftOf="@+id/tabs"
+ android:duplicateParentState="true"
+ android:clickable="false"
+ android:focusable="false"
+ android:src="@drawable/url_bar_entry"
+ android:scaleType="fitXY"/>
+
+ <!-- A View that clips with url_bar_entry and translates
+ around it to animate growing the url bar,
+ which occurs in the display/editing mode transitions. -->
+ <ImageView android:id="@+id/url_bar_translating_edge"
+ style="@style/UrlBar.Button"
+ android:layout_alignLeft="@id/url_bar_entry"
+ android:layout_alignRight="@+id/url_bar_entry"
+ android:layout_alignTop="@id/url_bar_entry"
+ android:layout_alignBottom="@id/url_bar_entry"
+ android:duplicateParentState="true"
+ android:clickable="false"
+ android:focusable="false"
+ android:visibility="invisible"
+ android:src="@drawable/url_bar_translating_edge"
+ android:scaleType="fitXY"/>
+
+ <org.mozilla.gecko.toolbar.ShapedButtonFrameLayout
+ android:id="@+id/menu"
+ style="@style/UrlBar.ImageButton"
+ android:layout_alignParentRight="true"
+ android:contentDescription="@string/menu"
+ android:background="@drawable/shaped_button">
+
+ <org.mozilla.gecko.widget.themed.ThemedImageView
+ android:id="@+id/menu_icon"
+ style="@style/UrlBar.ImageButton"
+ android:layout_height="@dimen/browser_toolbar_menu_icon_height"
+ android:layout_width="wrap_content"
+ android:scaleType="centerInside"
+ android:layout_gravity="center"
+ android:src="@drawable/menu"
+ android:tint="@color/tabs_tray_icon_grey"/>
+
+ </org.mozilla.gecko.toolbar.ShapedButtonFrameLayout>
+
+ <org.mozilla.gecko.toolbar.PhoneTabsButton android:id="@+id/tabs"
+ style="@style/UrlBar.ImageButton"
+ android:layout_width="64dip"
+ android:layout_toLeftOf="@id/menu"
+ android:layout_alignWithParentIfMissing="true"
+ android:background="@drawable/shaped_button"/>
+
+ <!-- The TextSwitcher should be shifted 24dp on the left, to avoid
+ the curve. On a 48dp space, centering 24dp image will leave
+ 12dp on all sides. However this image has a perception of
+ 2 layers. Hence to center this, an additional 4dp is added to the left.
+ The margins will be 40dp on left, 8dp on right, instead of ideal 30dp
+ and 12dp. -->
+ <org.mozilla.gecko.toolbar.TabCounter android:id="@+id/tabs_counter"
+ style="@style/UrlBar.ImageButton"
+ android:layout_width="24dip"
+ android:layout_height="24dip"
+ android:layout_centerVertical="true"
+ android:layout_marginRight="8dip"
+ android:layout_alignRight="@id/tabs"
+ android:background="@drawable/tabs_count"
+ android:gravity="center_horizontal"
+ android:clipChildren="false"
+ android:clipToPadding="false"/>
+
+ <!-- Note that the edit components are invisible so that the views
+ depending on their location can properly layout. -->
+ <org.mozilla.gecko.widget.themed.ThemedImageView
+ android:id="@+id/edit_cancel"
+ style="@style/UrlBar.ImageButton"
+ android:layout_alignParentRight="true"
+ android:src="@drawable/close_edit_mode_selector"
+ android:contentDescription="@string/edit_mode_cancel"
+ android:background="@drawable/action_bar_button"
+ android:visibility="invisible"/>
+
+ <!-- The space to the left of the cancel button would be larger than the right because
+ the url bar drawable contains some whitespace, so we compensate by removing
+ some padding from the right (value determined through experimentation). -->
+ <org.mozilla.gecko.toolbar.ToolbarEditLayout android:id="@+id/edit_layout"
+ style="@style/UrlBar.Button"
+ android:layout_alignLeft="@id/url_bar_entry"
+ android:layout_toLeftOf="@id/edit_cancel"
+ android:visibility="invisible"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"/>
+
+ <org.mozilla.gecko.toolbar.ToolbarDisplayLayout android:id="@+id/display_layout"
+ style="@style/UrlBar.Button"
+ android:layout_alignLeft="@id/url_bar_entry"
+ android:layout_alignRight="@id/url_bar_entry"
+ android:paddingLeft="1dip"
+ android:paddingRight="4dip"/>
+
+</merge>