react-native-tab-view icon indicating copy to clipboard operation
react-native-tab-view copied to clipboard

Keyboard with android:windowSoftInputMode="stateAlwaysHidden|adjustPan" enabled only work for first Tab not other tabs.

Open HessiPard opened this issue 4 years ago • 4 comments

Current behaviour

If you have a TextInput in all your tabs, the AndroidManifest property android:windowSoftInputMode="stateAlwaysHidden|adjustPan" only work for first tab and soft keyboard pushes screen up to see Input correctly. the soft Keyboard doesnt push screen in other tabs.

Expected behaviour

Keyboard should pushes up the screen in all tabs until the Input could be visible

Screenshots (if applicable)

Ejected react-native-tab-view Demo app -> Custom tab bar with:

Chat section at First Tab: Screenshot_1614430870

Chat section at Last Tab: Screenshot_1614431091

What have you tried

Set android:windowSoftInputMode="stateAlwaysHidden|adjustPan" in AndroidManifest.xml

Your Environment

software version
android
react-native 0.63.4
react-native-tab-view 2.14.4
react-native-gesture-handler 1.6.1
react-native-reanimated 1.9.0
node 15.10.0
npm or yarn 7.6.0

HessiPard avatar Feb 27 '21 13:02 HessiPard

Couldn't find version numbers for the following packages in the issue:

  • react-native

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

  • react-native-tab-view (found: 2.14.4, latest: 2.15.2)
  • react-native-gesture-handler (found: 1.6.1, latest: 1.10.3)
  • react-native-reanimated (found: 1.9.0, latest: 1.13.2)

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

github-actions[bot] avatar Feb 27 '21 13:02 github-actions[bot]

I solved this problem by upgrading the package version to 3.0.1 (the android:windowSoftInputMode configuration of my project is stateUnspecified|adjustPan).

Remember to install react-native-pager-view too

carlosdaniiel07 avatar Apr 21 '21 21:04 carlosdaniiel07

I solved this problem by upgrading the package version to 3.0.1 (the android:windowSoftInputMode configuration of my project is stateUnspecified|adjustPan).

Remember to install react-native-pager-view too

thanks man. it works perfectly after update.

HessiPard avatar May 18 '21 16:05 HessiPard

Hi again, we faced another problem in production related to this topic ... in some phones (mostly android 4) when there is input in nested tabbar inside another tabbar, selecting input then keyboard pushes screen up and after few seconds app crashes with following screen:

Screenshot_1629490572

config in AndroidManifest.xml is android:windowSoftInputMode="stateAlwaysHidden|adjustPan"

"react-native": "0.63.4",
"react-native-pager-view": "^5.1.8",
"react-native-tab-view": "^3.0.1", 

HessiPard avatar Aug 21 '21 18:08 HessiPard