Fix z-indexes to make tabbar scroll on Android (#7102)

This commit is contained in:
dan
2024-12-14 00:01:31 +00:00
committed by GitHub
parent ca8ca903b2
commit 55222c5b0e
5 changed files with 19 additions and 18 deletions
+1 -1
View File
@@ -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>
)} )}
+6 -8
View File
@@ -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}
+9 -7
View File
@@ -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}
+1 -1
View File
@@ -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)}
+2 -1
View File
@@ -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} />