With the release of Android R, the team at Google have included a set of new WindowInsets APIs which expands the control that we, as developers, have over the window insets. These include the status bar, navigation bar and on-screen keyboard.
There is now a direct way to check, toggle and listen for changes the visibility of windows insets. We can even control and react to the animation when the visibility changes, but that won’t be covered in this article (but perhaps in a future article!).
We’ll be looking at the input method editor (IME) input type specifically, which includes the on-screen keyboard, but the same approach can be used for other types of window insets. …
The mobile development scene is slowly shifting towards declarative UIs, but large and popular UI libraries are understandably still using the old UI paradigms. An example of this is Google’s Material Components for iOS library.
Therefore, if we want to use Material design in our iOS app that we are building in SwiftUI we can either:
We’ll be looking at the second option. We need a way to integrate the UIKit views provided by the library to be used in SwiftUI, and we can use UIViewRepresentable
to do exactly that. …
About