mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
For #7423: remove unnecessary wordmark_spacer view.
Co-authored-by: Emma Malysz <emalysz@mozilla.com>
This commit is contained in:
parent
053e5b8065
commit
a1cbbba4ea
@ -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<ViewGroup.MarginLayoutParams> {
|
||||
topMargin = 32.dpToPx(resources.displayMetrics)
|
||||
}
|
||||
|
||||
activity.themeManager.applyStatusBarTheme(activity)
|
||||
|
||||
return view
|
||||
|
@ -45,15 +45,6 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/wordmark_spacer"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/wordmark"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bottomBarShadow"
|
||||
android:layout_width="0dp"
|
||||
@ -143,4 +134,4 @@
|
||||
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user