1
1

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 3 years have passed since last update.

【React Native + Expo】【Android】コンポーネントがキーボードで押し上げられる

Last updated at Posted at 2020-12-18

Expo(managed workflow)環境で以下の記事と同様の現象が起きたので、その時の対処法を載せて起きます。
【React Native】TextInputでキーボードが押し上げられる【Android】

参考にした記事には以下のように書かれています。

対処法
anrdoird/app/src/mainの以下の部分を修正する

  •    android:windowSoftInputMode="adjustResize">
    
  •    android:windowSoftInputMode="adjustPan">
    

Expo(managed workflow)環境の場合はandroidディレクトリは存在しないので、app.jsonを変更します。

app.json
{
  "expo": {
     ...
    "android": {
    ...
      "softwareKeyboardLayoutMode": "pan" ←ここを追加
    },
  }
}

##参考資料
Expo app.json / app.config.js リファレンス
【React Native】TextInputでキーボードが押し上げられる【Android】
https://stackoverflow.com/questions/42840555/how-to-avoid-keyboard-pushing-layout-up-on-android-react-native

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?