react-navigation安卓从右到左切换视图

百度搜了3天都没一个正确的答案,最后还是google查到的:
 
"react-navigation": "^4.0.10",
"react-navigation-stack": "^1.9.4",
 
import { createStackNavigator ,StackViewStyleInterpolator} from 'react-navigation-stack';
 
createStackNavigator配置:
transitionConfig: ()=>({
/**
* 1、从右向左:forHorizontal
* 2、从下向上:forVertical
* 3、安卓那种的从下向上:forFadeFromBottomAndroid
* 4、无动画:forInitial
*/
screenInterpolator: StackViewStyleInterpolator.forHorizontal
}),
posted @ 2019-10-18 16:00  dtdxrk  阅读(1021)  评论(0编辑  收藏  举报