Are there any callback methods for when the quick settings dropdown menu is opened?

后端 未结 1 1029
刺人心
刺人心 2021-01-23 02:32

When I pull down the quick settings drop down menu while my app is opened and in the foreground, are there any callback methods called?

1条回答
  •  孤街浪徒
    2021-01-23 03:07

    I tried a few quicks tests and Activity.onWindowFocusChanged(boolean hasFocus) might work for you. It fires when I drag down quick settings but it will also likely fire for other reasons, like AlertDialogs.

    onWindowFocusChanged

    void onWindowFocusChanged (boolean hasFocus)

    Called when the current Window of the activity gains or loses focus. This is the best indicator of whether this activity is visible to the user.

    0 讨论(0)
提交回复
热议问题