1
0
Fork 0

For #7423: remove unnecessary CoordinatorLayout in fragment_home.

Co-authored-by: Emma Malysz <emalysz@mozilla.com>
master
Michael Comella 2020-01-13 16:25:22 -08:00 committed by Michael Comella
parent a1cbbba4ea
commit ffb2e72b97
1 changed files with 114 additions and 120 deletions

View File

@ -2,136 +2,130 @@
<!-- 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
<androidx.constraintlayout.motion.widget.MotionLayout
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/homeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="?homeBackground"
app:layoutDescription="@xml/home_scene"
tools:context=".home.HomeFragment">
<androidx.constraintlayout.motion.widget.MotionLayout
android:id="@+id/homeLayout"
<ImageButton
android:id="@+id/privateBrowsingButton"
android:layout_width="@dimen/glyph_button_height"
android:layout_height="@dimen/glyph_button_height"
android:layout_marginEnd="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/content_description_private_browsing_button"
app:srcCompat="@drawable/private_browsing_button"
app:layout_constraintBottom_toTopOf="@+id/wordmark"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/wordmark"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:layout_marginStart="16dp"
android:layout_marginTop="60dp"
android:layout_marginBottom="32dp"
android:adjustViewBounds="true"
android:clickable="false"
android:contentDescription="@string/app_name"
android:focusable="false"
android:importantForAccessibility="no"
app:srcCompat="?fenixLogo"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/bottomBarShadow"
android:layout_width="0dp"
android:layout_height="1dp"
android:background="@color/bottom_bar_shadow"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/bottom_bar"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bottom_bar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?homeBackground"
app:layoutDescription="@xml/home_scene"
tools:context=".home.HomeFragment">
android:layout_height="wrap_content"
android:background="?bottomBarBackground"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<org.mozilla.fenix.home.SearchView
android:id="@+id/toolbar_wrapper"
android:transitionName="toolbar_wrapper_transition"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginEnd="0dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/home_search_background_normal"
android:clickable="true"
android:contentDescription="@string/search_hint"
android:focusable="true"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/add_tab_button"
app:layout_constraintStart_toStartOf="parent">
<ImageView
android:id="@+id/search_engine_icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="8dp"
android:layout_gravity="start|center_vertical"
android:clickable="false"
android:focusable="false"
android:importantForAccessibility="no" />
<TextView
android:id="@+id/toolbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_marginStart="44dp"
android:clickable="false"
android:focusable="false"
android:lines="1"
android:ellipsize="end"
android:importantForAccessibility="no"
android:text="@string/search_hint"
android:textColor="?primaryText"
android:textSize="15sp" />
</org.mozilla.fenix.home.SearchView>
<ImageButton
android:id="@+id/privateBrowsingButton"
android:layout_width="@dimen/glyph_button_height"
android:layout_height="@dimen/glyph_button_height"
android:layout_marginEnd="12dp"
android:id="@+id/add_tab_button"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/content_description_private_browsing_button"
app:srcCompat="@drawable/private_browsing_button"
app:layout_constraintBottom_toTopOf="@+id/wordmark"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/wordmark"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:layout_marginStart="16dp"
android:layout_marginTop="60dp"
android:layout_marginBottom="32dp"
android:adjustViewBounds="true"
android:clickable="false"
android:contentDescription="@string/app_name"
android:focusable="false"
android:importantForAccessibility="no"
app:srcCompat="?fenixLogo"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/bottomBarShadow"
android:layout_width="0dp"
android:layout_height="1dp"
android:background="@color/bottom_bar_shadow"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/bottom_bar"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bottom_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?bottomBarBackground"
android:contentDescription="@string/add_tab"
app:srcCompat="@drawable/ic_new"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
app:layout_constraintEnd_toStartOf="@+id/menuButton"
app:layout_constraintStart_toEndOf="@id/toolbar_wrapper"
app:layout_constraintTop_toTopOf="parent" />
<org.mozilla.fenix.home.SearchView
android:id="@+id/toolbar_wrapper"
android:transitionName="toolbar_wrapper_transition"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginEnd="0dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/home_search_background_normal"
android:clickable="true"
android:contentDescription="@string/search_hint"
android:focusable="true"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/add_tab_button"
app:layout_constraintStart_toStartOf="parent">
<ImageButton
android:id="@+id/menuButton"
android:layout_width="36dp"
android:layout_height="48dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/content_description_menu"
app:srcCompat="@drawable/ic_menu"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<ImageView
android:id="@+id/search_engine_icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="8dp"
android:layout_gravity="start|center_vertical"
android:clickable="false"
android:focusable="false"
android:importantForAccessibility="no" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/toolbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_marginStart="44dp"
android:clickable="false"
android:focusable="false"
android:lines="1"
android:ellipsize="end"
android:importantForAccessibility="no"
android:text="@string/search_hint"
android:textColor="?primaryText"
android:textSize="15sp" />
</org.mozilla.fenix.home.SearchView>
<ImageButton
android:id="@+id/add_tab_button"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/add_tab"
app:srcCompat="@drawable/ic_new"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/menuButton"
app:layout_constraintStart_toEndOf="@id/toolbar_wrapper"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/menuButton"
android:layout_width="36dp"
android:layout_height="48dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/content_description_menu"
app:srcCompat="@drawable/ic_menu"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.motion.widget.MotionLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.constraintlayout.motion.widget.MotionLayout>