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

109 lines
5.0 KiB
XML
Raw Normal View History

2019-01-09 23:22:58 +01:00
<?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.coordinatorlayout.widget.CoordinatorLayout
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:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.motion.widget.MotionLayout
android:id="@+id/homeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?homeBackground"
app:layoutDescription="@xml/home_scene"
tools:context=".home.HomeFragment">
<ImageButton
android:id="@+id/menuButton"
android:layout_width="@dimen/glyph_button_height"
android:layout_height="@dimen/glyph_button_height"
2019-06-04 23:42:27 +02:00
android:layout_marginTop="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_menu"
android:contentDescription="@string/content_description_menu"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/privateBrowsingButton"
android:layout_width="@dimen/glyph_button_height"
android:layout_height="@dimen/glyph_button_height"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/private_browsing_button"
android:contentDescription="@string/content_description_private_browsing_button"
app:layout_constraintEnd_toStartOf="@id/menuButton"
app:layout_constraintTop_toTopOf="@id/menuButton" />
<ImageView
android:id="@+id/wordmark"
android:layout_width="wrap_content"
android:layout_height="80dp"
2019-06-04 23:42:27 +02:00
android:layout_marginTop="24dp"
android:layout_marginStart="16dp"
2019-04-13 00:20:49 +02:00
android:src="?fenixLogo"
android:contentDescription="@string/app_name"
android:adjustViewBounds="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/menuButton" />
2019-01-10 01:07:33 +01:00
<org.mozilla.fenix.home.SearchView
2019-04-05 18:38:14 +02:00
android:id="@+id/toolbar_wrapper"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
2019-06-04 23:42:27 +02:00
android:layout_marginTop="48dp"
android:layout_marginEnd="16dp"
2019-04-13 00:20:49 +02:00
android:background="@drawable/home_search_background_normal"
android:elevation="@dimen/toolbar_elevation"
android:transitionName="toolbar_wrapper_transition"
2019-04-05 18:38:14 +02:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/wordmark">
<ImageView
android:id="@+id/search_engine_icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_margin="12dp" />
<TextView
2019-04-05 18:38:14 +02:00
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_marginStart="47dp"
2019-04-05 18:38:14 +02:00
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:padding="12dp"
2019-04-05 18:38:14 +02:00
android:text="@string/search_hint"
2019-04-13 00:20:49 +02:00
android:textColor="?primaryText"
android:textSize="15sp" />
</org.mozilla.fenix.home.SearchView>
2019-01-10 01:07:33 +01:00
<View
android:id="@+id/homeDivider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?neutralFaded"
app:layout_constraintTop_toBottomOf="@id/toolbar_wrapper"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
2019-06-04 23:42:27 +02:00
android:layout_marginTop="32dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"/>
<View
android:id="@+id/homeDividerShadow"
android:layout_width="0dp"
android:layout_height="3dp"
android:alpha="0"
android:background="@drawable/home_header_shadow"
app:layout_constraintTop_toBottomOf="@id/homeDivider"
app:layout_constraintStart_toStartOf="@+id/homeDivider"
app:layout_constraintEnd_toEndOf="@+id/homeDivider" />
</androidx.constraintlayout.motion.widget.MotionLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>