我想像苹果音乐或Spotify一样在自定义标签栏中实现播放器栏。 对于TabNavigator,我有:
const TabNavigator = createBottomTabNavigator({
HomeStack,
LibraryStack,
},
{
initialRouteName: 'HomeStack',
tabBarComponent: props => <CustomTabBar {...props} />,
tabBarOptions: {
showLabel: false,
}
});
对于我的自定义TabBar,我想要这样的东西:
import React from 'react';
import { BottomTabBar } from 'react-navigation';
import BottomSheet from 'reanimated-bottom-sheet'
const CustomTabBar = props => {
return (
<React.Fragment>
<BottomSheet
snapPoints = {[450, 300, 0]}
renderContent = {this.renderInner}
renderHeader = {this.renderHeader}
/>
<BottomTabBar {...props} />
</React.Fragment>
);
};
export default CustomTabBar;
问题是:BottomSheet位于TabBar的后面,并且阻止了Tabbar上的触摸,因此我无法再在Tabs之间切换。该如何处理?
亲切问候