z

    zoha131

    1 year ago
    How can I clear focus? I have tried
    FocusRequester#freeFocus()
    but it does not work for me.
    l

    Leland Richardson [G]

    1 year ago
    This got me as well. Currently you do this by getting the AmbientFocusManager and calling clearFocus on it
    Api is still in flux though iiuc
    z

    zoha131

    1 year ago
    It works. Thanks a lot.
    David Attias

    David Attias

    1 year ago
    How do you get that
    AmbientFocusManager
    ?
    nickbutcher

    nickbutcher

    1 year ago
    AmbientFocusManager.current
    David Attias

    David Attias

    1 year ago
    Can't find that class... is it rather FocusManager ?
    nickbutcher

    nickbutcher

    1 year ago
    Oh sorry, looks like it was renamed from
    FocusManagerAmbient
    in https://android-review.googlesource.com/c/platform/frameworks/support/+/1495457 which won't be released until
    alpha08
    i.e. try
    FocusManagerAmbient.current
    David Attias

    David Attias

    1 year ago
    Thanks! It's working reat!