小编Ahm*_*ssa的帖子

React Native 滚动视图仅在 ios 上弹跳,而不是在 Android 上弹跳

如何让滚动视图在 Android 上反弹?

文档看来,滚动视图应该只在 ios 上反弹?!

除了设置还有其他方法bounces = {true}吗?

native scrollview bounce reactjs react-native

7
推荐指数
0
解决办法
6290
查看次数

无论我做什么,DrawerNavigator 都无法将背景设置为透明?

我花了超过 si 个小时尝试将 DrawerNavigator 的背景更改为透明,但没有成功。当我在主要组件中更改它时写入它可以工作

const MainTabBarDrawer = DrawerNavigator({
Home:{
    screen:MainTabNavigator,
},

},{
drawerWidth: 200,
drawerPosition: 'right',
// contentComponent: props => <Text style={{color:'white'}} >text 
</Text>,
drawerBackgroundColor: 'yellow',
//backgroundColor:'transparent',
// style: {
// //backgroundColor: 'transparent',
// flex: 1
// },
// contentOptions: {
//     style: {
//     backgroundColor: 'transparent',
//     flex: 1
// }


},
{
style: {
    backgroundColor: 'transparent',
        flex:1
}
}
)


class App extends Component{

render()
{
return(<MainTabBarDrawer style={{backgroundColor: 'transparent'}}/>)
//return(<Login/>)
}

}
Run Code Online (Sandbox Code Playgroud)

虽然上述方法可行,但我的布局非常复杂,我不希望抽屉出现在我的所有视图中。那么有人知道我是否可以直接更改 DrawerNavigator 的背景而不将其渲染为组件吗?

react-native react-native-ios react-native-navigation react-navigation

2
推荐指数
1
解决办法
3461
查看次数