Paolo Montalto
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!

--

--

Paolo Montalto
Paolo Montalto

Written by Paolo Montalto

Android Engineer, freelance, mobile developer, software craftsman, guitar strummer, husband, father, humble.

No responses yet