Loading app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt +33 −8 Original line number Diff line number Diff line Loading @@ -379,14 +379,31 @@ class HomeFragment : Fragment() { view?.sessionControlRecyclerView?.apply { (layoutParams as ViewGroup.MarginLayoutParams).setMargins(0, 0, 0, 60) } view?.homeAppBar?.apply { view?.toolbarLayout?.apply { visibility = View.VISIBLE children.forEach { (it.layoutParams as AppBarLayout.LayoutParams).scrollFlags = if (onboarding.userHasBeenOnboarded()) { AppBarLayout.LayoutParams.SCROLL_FLAG_NO_SCROLL // If the Layout rendering pass was completed, then we have a |height| value, // if it wasn't completed then we have 0. if (height == 0) { // Set the bottom margin after the toolbar height is defined during Layout doOnLayout { val toolbarLayoutHeight = view.toolbarLayout.height view.sessionControlRecyclerView?.apply { (layoutParams as ViewGroup.MarginLayoutParams).setMargins( 0, 0, 0, toolbarLayoutHeight - SESSION_CONTROL_VIEW_PADDING ) } } } else { AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL view.sessionControlRecyclerView?.apply { (layoutParams as ViewGroup.MarginLayoutParams).setMargins( 0, 0, 0, height - SESSION_CONTROL_VIEW_PADDING ) } } } Loading @@ -398,8 +415,16 @@ class HomeFragment : Fragment() { View.GONE } } view?.toolbarLayout?.apply { view?.homeAppBar?.apply { visibility = View.VISIBLE children.forEach { (it.layoutParams as AppBarLayout.LayoutParams).scrollFlags = if (onboarding.userHasBeenOnboarded()) { AppBarLayout.LayoutParams.SCROLL_FLAG_NO_SCROLL } else { AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL } } } } } Loading Loading
app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt +33 −8 Original line number Diff line number Diff line Loading @@ -379,14 +379,31 @@ class HomeFragment : Fragment() { view?.sessionControlRecyclerView?.apply { (layoutParams as ViewGroup.MarginLayoutParams).setMargins(0, 0, 0, 60) } view?.homeAppBar?.apply { view?.toolbarLayout?.apply { visibility = View.VISIBLE children.forEach { (it.layoutParams as AppBarLayout.LayoutParams).scrollFlags = if (onboarding.userHasBeenOnboarded()) { AppBarLayout.LayoutParams.SCROLL_FLAG_NO_SCROLL // If the Layout rendering pass was completed, then we have a |height| value, // if it wasn't completed then we have 0. if (height == 0) { // Set the bottom margin after the toolbar height is defined during Layout doOnLayout { val toolbarLayoutHeight = view.toolbarLayout.height view.sessionControlRecyclerView?.apply { (layoutParams as ViewGroup.MarginLayoutParams).setMargins( 0, 0, 0, toolbarLayoutHeight - SESSION_CONTROL_VIEW_PADDING ) } } } else { AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL view.sessionControlRecyclerView?.apply { (layoutParams as ViewGroup.MarginLayoutParams).setMargins( 0, 0, 0, height - SESSION_CONTROL_VIEW_PADDING ) } } } Loading @@ -398,8 +415,16 @@ class HomeFragment : Fragment() { View.GONE } } view?.toolbarLayout?.apply { view?.homeAppBar?.apply { visibility = View.VISIBLE children.forEach { (it.layoutParams as AppBarLayout.LayoutParams).scrollFlags = if (onboarding.userHasBeenOnboarded()) { AppBarLayout.LayoutParams.SCROLL_FLAG_NO_SCROLL } else { AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL } } } } } Loading