Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 401
Florian Walther Avatar asked Oct 19 '25 13:10

Florian Walther


1 Answers

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.

like image 106
Robert Nekic Avatar answered Oct 22 '25 04:10

Robert Nekic