@@ -2,10 +2,10 @@ package com.swmansion.rnscreens.gamma.tabs
22
33import android.content.res.Configuration
44import android.view.Choreographer
5+ import android.view.Gravity
56import android.view.MenuItem
67import android.view.View
78import android.widget.FrameLayout
8- import android.widget.LinearLayout
99import androidx.appcompat.view.ContextThemeWrapper
1010import androidx.fragment.app.FragmentManager
1111import com.facebook.react.modules.core.ReactChoreographer
@@ -22,7 +22,7 @@ import kotlin.properties.Delegates
2222
2323class TabsHost (
2424 val reactContext : ThemedReactContext ,
25- ) : LinearLayout (reactContext),
25+ ) : FrameLayout (reactContext),
2626 TabScreenDelegate ,
2727 SafeAreaProvider ,
2828 View .OnLayoutChangeListener {
@@ -99,19 +99,21 @@ class TabsHost(
9999
100100 private val bottomNavigationView: BottomNavigationView =
101101 BottomNavigationView (wrappedContext).apply {
102- layoutParams = LayoutParams (LayoutParams .MATCH_PARENT , LayoutParams .WRAP_CONTENT )
102+ layoutParams =
103+ LayoutParams (
104+ LayoutParams .MATCH_PARENT ,
105+ LayoutParams .WRAP_CONTENT ,
106+ Gravity .BOTTOM ,
107+ )
103108 }
104109
105110 private val contentView: FrameLayout =
106111 FrameLayout (reactContext).apply {
107112 layoutParams =
108- LinearLayout
109- .LayoutParams (
110- LayoutParams .MATCH_PARENT ,
111- LayoutParams .WRAP_CONTENT ,
112- ).apply {
113- weight = 1f
114- }
113+ LayoutParams (
114+ LayoutParams .MATCH_PARENT ,
115+ LayoutParams .MATCH_PARENT ,
116+ )
115117 id = ViewIdGenerator .generateViewId()
116118 }
117119
@@ -201,7 +203,6 @@ class TabsHost(
201203 }
202204
203205 init {
204- orientation = VERTICAL
205206 addView(contentView)
206207 addView(bottomNavigationView)
207208
0 commit comments