fragment_home.xml (3108B)
1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- This Source Code Form is subject to the terms of the Mozilla Public 3 - License, v. 2.0. If a copy of the MPL was not distributed with this 4 - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> 5 6 <!-- using an AppBarLayout to replace MotionLayout was done in order to improve Fenix 7 start up performance. The use of a MotionLayout was worsening our layout measures, especially 8 with the recycler view --> 9 <androidx.coordinatorlayout.widget.CoordinatorLayout 10 xmlns:android="http://schemas.android.com/apk/res/android" 11 xmlns:app="http://schemas.android.com/apk/res-auto" 12 xmlns:tools="http://schemas.android.com/tools" 13 android:id="@+id/homeLayout" 14 android:layout_width="match_parent" 15 android:layout_height="match_parent"> 16 17 <androidx.appcompat.widget.AppCompatImageView 18 android:id="@+id/wallpaperImageView" 19 android:layout_width="match_parent" 20 android:layout_height="match_parent" 21 android:visibility="gone"/> 22 23 <com.google.android.material.appbar.AppBarLayout 24 android:id="@+id/homeAppBar" 25 android:layout_width="match_parent" 26 android:layout_height="wrap_content" 27 android:background="@null" 28 app:elevation="0dp" 29 android:fitsSystemWindows="false"> 30 31 <com.google.android.material.appbar.CollapsingToolbarLayout 32 android:id="@+id/homeAppBarContent" 33 android:layout_width="match_parent" 34 android:layout_height="match_parent" 35 app:layout_scrollFlags="scroll"> 36 </com.google.android.material.appbar.CollapsingToolbarLayout> 37 38 </com.google.android.material.appbar.AppBarLayout> 39 40 <androidx.compose.ui.platform.ComposeView 41 android:id="@+id/homepageView" 42 android:layout_width="match_parent" 43 android:layout_height="match_parent" 44 app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" /> 45 46 <androidx.compose.ui.platform.ComposeView 47 android:id="@+id/torHomepageView" 48 android:layout_width="match_parent" 49 android:layout_height="match_parent" /> 50 51 <ViewStub 52 android:id="@+id/toolbarLayoutStub" 53 android:layout_width="match_parent" 54 android:layout_height="wrap_content" 55 android:layout_gravity="bottom" 56 android:elevation="5dp" 57 android:layout="@layout/fragment_home_toolbar_view_layout" 58 tools:context=".home.HomeFragment" /> 59 60 <androidx.constraintlayout.widget.ConstraintLayout 61 android:id="@+id/dynamicSnackbarContainer" 62 android:layout_width="wrap_content" 63 android:layout_height="wrap_content" 64 android:layout_gravity="bottom" 65 android:elevation="@dimen/browser_fragment_toolbar_elevation" 66 tools:ignore="MozMultipleConstraintLayouts" /> 67 68 <FrameLayout 69 android:id="@+id/navigationBarContainer" 70 android:layout_width="match_parent" 71 android:layout_height="wrap_content" 72 android:layout_gravity="bottom" /> 73 74 </androidx.coordinatorlayout.widget.CoordinatorLayout>