Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-98984

Android 11 - IME transitions

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • P3: Somewhat important
    • 6.4.0 FF
    • 6.3
    • QPA: Android
    • None

    Description

      Overview:

      Android 11 introduces new APIs to improve transitions for input method editors (IMEs), such as on-screen keyboards. These APIs make it easier to adjust your app's content in synchronization with the IME's appearance and disappearance, and with other elements like the status and navigation bars. 

      Example:

      To show an IME while any EditText has the focus, call view.getInsetsController().show(Type.ime()). (You can call this method on any view in the same hierarchy as the focused EditText, you don't have to call it on the EditText specifically.) To hide the IME, call view.getInsetsController().hide(Type.ime()). You can check whether an IME is currently visible by calling view.getRootWindowInsets().isVisible(Type.ime())

      To synchronize your app's views with the appearance and disappearance of the IME, set a listener on a view by providing a WindowInsetsAnimation.Callback to View.setWindowInsetsAnimationCallback(). (You can set this listener on any view, it doesn't have to be an EditText.) The IME calls your listener's onPrepare() method, then it calls onStart() at the beginning of the transition. It then calls onProgress() at each progression in the transition. When the transition has finished, the IME calls onEnd(). At any point in the transition, you can find out how much progress the transition has made by calling WindowInsetsAnimation.getFraction()

      For an example of how to use these APIs, see the new WindowInsetsAnimation code sample. 

      Proposed Actions:

      • Check feability to refactor our IME to use the new APIs. It is added to Compat, so it is backward compatible.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtandroidteam Qt Android Team
              samuelmira Samuel Mira
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes