react-native-router-flux改变安卓切换动画

2018-11-23  本文已影响0人  Jarry_491b

实现安卓和ios一样的从右往左的切换效果,安卓中默认是从下往上,需要在Stack这层配置transitionConfig={() => ({ screenInterpolator: CardStackStyleInterpolator.forHorizontal })}

              {/*智能借还*/}
              <Stack hideNavBar key="circulationInit" titleStyle={{ alignSelf: 'center' }} transitionConfig={() => ({ screenInterpolator: CardStackStyleInterpolator.forHorizontal })}>
                <Scene key="circulation" component={BookList}/>
                <Scene key="circulationSearch" component={CirculationSearch}/>
                <Scene key="breakBook" component={BreakBook}/>
                <Scene key="bookLoss" component={BoolLoss}/>
              </Stack>

然后报错,提示这个文件不存在:CardStackStyleInterpolator,查询后得知:

上一篇下一篇

猜你喜欢

热点阅读