I'm making a chat app and would like to keep the soft keyboard open while the chat window is visible. The keyboard should not hide when the user taps any other control on the same page. My view hirearcy looks like this:
LinearLayout
RecyclerView
LinearLayout
The child linear layout has an EditText and a button to send a message. Once the page is shown, I'm requesting focus on the edit text and showing soft input with the SHOW_FORCED flag. The problem is, when I tap on the RecyclerView or the send button and if the edit text has focus, then the keyboard will hide.
Is it possible to make sure the edit text never loses focus (thus preventing the keyboard from disappearing)? I was able to accomplish this with ease on iOS, but I'm having difficulty on Android.
from Android: Prevent soft keyboard from closing in a chat window
No comments:
Post a Comment