In my app if certain edit texts are not filled then an error snackbar appears but when I start to type again the snackbar is comming above the keyboard blocking the edit text.
I am using android:windowSoftInputMode="stateHidden|adjustPan"
in manifest.
What should I do to either stop the snackbar from comming up or the snackbar should not overlap the edit text?
Asked
Active
Viewed 42 times
0
-
You can Hide the Snack Bar when Keyboard appears .. You can [detect](https://stackoverflow.com/questions/4745988/how-do-i-detect-if-software-keyboard-is-visible-on-android-device-or-not) Keyboard visibility .. – ADM May 19 '23 at 11:14
-
It was better if you had provided the code. 1) I guess you are validating the text in the edittext on every inputted character. You may change the code to validate the input after the focus is changed. 2)You may also set the duration of sanckbar to 'short'. So it will disappear in some seconds. 3) when the user clicks on the edittext you can even cancel (hide) that snackbar. – Ali.M May 20 '23 at 05:14