Fix z-indexes to make tabbar scroll on Android (#7102)
This commit is contained in:
@@ -134,7 +134,7 @@ export default function HashtagScreen({
|
|||||||
<Pager
|
<Pager
|
||||||
onPageSelected={onPageSelected}
|
onPageSelected={onPageSelected}
|
||||||
renderTabBar={props => (
|
renderTabBar={props => (
|
||||||
<Layout.Center style={web([a.sticky, a.z_10, {top: 0}])}>
|
<Layout.Center style={[a.z_10, web([a.sticky, {top: 0}])]}>
|
||||||
<TabBar items={sections.map(section => section.title)} {...props} />
|
<TabBar items={sections.map(section => section.title)} {...props} />
|
||||||
</Layout.Center>
|
</Layout.Center>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -136,14 +136,12 @@ export const Pager = forwardRef<PagerRef, React.PropsWithChildren<Props>>(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View testID={testID} style={[a.flex_1, native(a.overflow_hidden)]}>
|
<View testID={testID} style={[a.flex_1, native(a.overflow_hidden)]}>
|
||||||
<View style={a.z_10 /* Let tabbar bottom border cover the glimmer */}>
|
{renderTabBar({
|
||||||
{renderTabBar({
|
selectedPage,
|
||||||
selectedPage,
|
onSelect: onTabBarSelect,
|
||||||
onSelect: onTabBarSelect,
|
dragProgress,
|
||||||
dragProgress,
|
dragState,
|
||||||
dragState,
|
})}
|
||||||
})}
|
|
||||||
</View>
|
|
||||||
<GestureDetector gesture={nativeGesture}>
|
<GestureDetector gesture={nativeGesture}>
|
||||||
<AnimatedPagerView
|
<AnimatedPagerView
|
||||||
ref={pagerView}
|
ref={pagerView}
|
||||||
|
|||||||
@@ -134,14 +134,16 @@ let PagerTabBar = ({
|
|||||||
<Layout.Center>{renderHeader?.({setMinimumHeight: noop})}</Layout.Center>
|
<Layout.Center>{renderHeader?.({setMinimumHeight: noop})}</Layout.Center>
|
||||||
{tabBarAnchor}
|
{tabBarAnchor}
|
||||||
<Layout.Center
|
<Layout.Center
|
||||||
style={web([
|
style={[
|
||||||
a.sticky,
|
|
||||||
a.z_10,
|
a.z_10,
|
||||||
{
|
web([
|
||||||
top: 0,
|
a.sticky,
|
||||||
display: isHeaderReady ? undefined : 'none',
|
{
|
||||||
},
|
top: 0,
|
||||||
])}>
|
display: isHeaderReady ? undefined : 'none',
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
]}>
|
||||||
<TabBar
|
<TabBar
|
||||||
testID={testID}
|
testID={testID}
|
||||||
items={items}
|
items={items}
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export function NotificationsScreen({}: Props) {
|
|||||||
<Pager
|
<Pager
|
||||||
onPageSelected={onPageSelected}
|
onPageSelected={onPageSelected}
|
||||||
renderTabBar={props => (
|
renderTabBar={props => (
|
||||||
<Layout.Center style={web([a.sticky, a.z_10, {top: 0}])}>
|
<Layout.Center style={[a.z_10, web([a.sticky, {top: 0}])]}>
|
||||||
<TabBar
|
<TabBar
|
||||||
{...props}
|
{...props}
|
||||||
items={sections.map(section => section.title)}
|
items={sections.map(section => section.title)}
|
||||||
|
|||||||
@@ -532,7 +532,8 @@ let SearchScreenInner = ({
|
|||||||
renderTabBar={props => (
|
renderTabBar={props => (
|
||||||
<Layout.Center
|
<Layout.Center
|
||||||
style={[
|
style={[
|
||||||
web([a.sticky, a.z_10]),
|
a.z_10,
|
||||||
|
web([a.sticky]),
|
||||||
{top: isWeb ? headerHeight : undefined},
|
{top: isWeb ? headerHeight : undefined},
|
||||||
]}>
|
]}>
|
||||||
<TabBar items={sections.map(section => section.title)} {...props} />
|
<TabBar items={sections.map(section => section.title)} {...props} />
|
||||||
|
|||||||
Reference in New Issue
Block a user