1
0
Fork 0
fenix/app/src/main/res/layout/fragment_search.xml

100 lines
4.1 KiB
XML

<?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/. -->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/search_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?foundation"
tools:context=".search.SearchFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/toolbar_wrapper"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_margin="8dp"
android:background="@drawable/search_url_background"
android:outlineProvider="paddedBounds"
android:transitionName="toolbar_wrapper_transition"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/searchEngineIcon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_margin="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<FrameLayout
android:id="@+id/toolbar_component_wrapper"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/searchEngineIcon"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/searchWithShortcuts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:fontFamily="Inter UI"
android:letterSpacing="0.15"
android:text="@string/search_shortcuts_search_with"
android:textAllCaps="true"
android:textColor="?secondaryText"
android:textSize="12sp"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintStart_toStartOf="@id/toolbar_wrapper"
app:layout_constraintTop_toBottomOf="@id/toolbar_wrapper" />
<View
android:id="@+id/search_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?neutralFaded"
app:layout_constraintBottom_toTopOf="@id/pillWrapper"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<LinearLayout
android:id="@+id/pillWrapper"
android:layout_width="0dp"
android:layout_height="40dp"
android:background="?foundation"
android:orientation="horizontal"
android:paddingStart="20dp"
android:paddingTop="4dp"
android:paddingEnd="16dp"
android:paddingBottom="4dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<ToggleButton
android:id="@+id/searchScanButton"
style="@style/search_pill"
android:layout_marginEnd="8dp"
android:drawableStart="@drawable/ic_qr"
android:textOff="@string/search_scan_button"
android:textOn="@string/search_scan_button" />
<ToggleButton
android:id="@+id/searchShortcutsButton"
style="@style/search_pill"
android:drawableStart="@drawable/ic_search"
android:textOff="@string/search_shortcuts_button"
android:textOn="@string/search_shortcuts_button" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>