I have the following activity_main.xml shown at bottom. There, a
CoordinatorLayout and two
LinearLayouts occur. The first LinearLayout1 has an
EditText to input some text, with a button to send it. The second one has two other buttons.
If i click into the
EditText, the keyboard shows up and makes everything in LinearLayout2 barely visible. So, i want to hide both buttons in last layout when keyboard is open.
I already found out to use
android:windowSoftInputMode="stateHidden" may be the trick, but only in connection with activities in
AndroidManifest.xml. I just want to use this inner the second linear layout. Already tried to use it there, but with no success.
In addition, i what to handle this in my xml and keep my MainActivity-code clean. Any possibilities for this?
<?xml version="1.0" encoding="utf-8"?>