16

I am aware that the android:windowSoftInputMode manifest attribute can be set programmatically using the following method:

getWindow().setSoftInputMode(
       WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);

Is there any way to get this value programmatically? I do not see a corresponding getter method.

Dean Wild
  • 5,886
  • 3
  • 38
  • 45

1 Answers1

29

Found the solution, there is no 'convenience' get method but you can easily interrogate the window attributes manually:

int mode = getActivity().getWindow().getAttributes().softInputMode;
Dean Wild
  • 5,886
  • 3
  • 38
  • 45