diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt index ee76438506..4caf447628 100644 --- a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt @@ -24,6 +24,7 @@ import androidx.constraintlayout.widget.ConstraintSet.END import androidx.constraintlayout.widget.ConstraintSet.PARENT_ID import androidx.constraintlayout.widget.ConstraintSet.START import androidx.constraintlayout.widget.ConstraintSet.TOP +import androidx.core.view.updateLayoutParams import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels import androidx.lifecycle.Lifecycle @@ -58,6 +59,7 @@ import mozilla.components.feature.media.ext.getSession import mozilla.components.feature.media.state.MediaState import mozilla.components.feature.media.state.MediaStateMachine import mozilla.components.feature.tab.collections.TabCollection +import mozilla.components.support.ktx.android.util.dpToPx import org.mozilla.fenix.BrowserDirection import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.R @@ -199,13 +201,18 @@ class HomeFragment : Fragment() { ConstraintSet().apply { clone(view.homeLayout) - connect(sessionControlView.view.id, TOP, view.wordmark_spacer.id, BOTTOM) + connect(sessionControlView.view.id, TOP, view.wordmark.id, BOTTOM) connect(sessionControlView.view.id, START, PARENT_ID, START) connect(sessionControlView.view.id, END, PARENT_ID, END) connect(sessionControlView.view.id, BOTTOM, view.bottom_bar.id, TOP) applyTo(view.homeLayout) } + @Suppress("MagicNumber") // we need constants if we define layouts in code. + sessionControlView.view.updateLayoutParams { + topMargin = 32.dpToPx(resources.displayMetrics) + } + activity.themeManager.applyStatusBarTheme(activity) return view diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index 23d205a866..72b39391bf 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -45,15 +45,6 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - - - \ No newline at end of file +