summaryrefslogtreecommitdiffstats
path: root/mobile/android/base/resources/layout/search_engine_bar_item.xml
diff options
context:
space:
mode:
Diffstat (limited to 'mobile/android/base/resources/layout/search_engine_bar_item.xml')
-rw-r--r--mobile/android/base/resources/layout/search_engine_bar_item.xml32
1 files changed, 32 insertions, 0 deletions
diff --git a/mobile/android/base/resources/layout/search_engine_bar_item.xml b/mobile/android/base/resources/layout/search_engine_bar_item.xml
new file mode 100644
index 000000000..f8c546d93
--- /dev/null
+++ b/mobile/android/base/resources/layout/search_engine_bar_item.xml
@@ -0,0 +1,32 @@
+<?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/. -->
+
+<!-- TwoWayView doesn't let us set the margin around items (except as
+ gecko:itemMargin, but that doesn't increase the hit area) so we
+ have to surround the main View by a ViewGroup to create a pressable margin.
+
+ Note: the layout_height values are shared with the parent
+ View (browser_search at the time of this writing).
+
+ The actual width of the FrameLayout is calculated at runtime by the
+ SearchEngineBar class to spread the icons across the device's width. -->
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/search_engine_icon_container"
+ android:layout_width="72dp"
+ android:layout_height="match_parent"
+ android:clickable="true"
+ android:background="@color/pressed_about_page_header_grey">
+
+ <!-- Width & height are set to make the Favicons as sharp as possible
+ based on asset size. -->
+ <ImageView
+ android:id="@+id/search_engine_icon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center"
+ android:scaleType="fitCenter"/>
+
+</FrameLayout>