1 min readNov 20, 2018
Hi Kirill Karmazin,
the method getSoftInputMode in the post in Kotlin is an extension method of the Window class so it will always be called on an actual Window object, e.g. activity?.window?.getSoftInputMode()
To answer your remark about the event of “attributes” being null, the method getAttributes returns the existing window attributes object, or a freshly created one if there is none.
Thanks for reading and contributing!