5
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

React Native + React Navigation で、 Android の画面遷移アニメーションを iOS と同様にする

Last updated at Posted at 2019-08-21

React Navigation の画面遷移のアニメーション、 Android だけよくわからない。

デフォルトだと、モーダルが重なるようになるが、 iOS のように左から右に進んでいくようにしたい。

めっちゃ簡単にできた。

import {
  createAppContainer,
  createStackNavigator,
  StackViewTransitionConfigs,
} from 'react-navigation'

const Navigation = createStackNavigator({
  screenA: ComponentA,
  screenB: ComponentB,
}, {
  mode: 'card',
  transitionConfig: () => StackViewTransitionConfigs.SlideFromRightIOS,
}

export const AppNavigation = createAppContainer(Navigation)

なんでこれがデフォルトじゃないんだ・・・笑

5
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?