Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to close the new Android 7.1 App Shortcut

When clicking on the app-shortcut, I am opening an Activity with a Dialog theme. It seems that the app-shortcuts are not closed if I use that theme on the Activity. If I delete the Dialog theme, the app-shortcuts are closed after clicking on one of them. Any idea? Thanks!

like image 333
ricamgar Avatar asked Nov 08 '22 06:11

ricamgar


1 Answers

I was able to reproduce your problem, at least with the Pixel Launcher.

The rendering and behavior of app shortcuts is up to the app that is showing the shortcuts. Perhaps the Pixel Launcher is only collapsing the app shortcuts panel in onStop(). When a shortcut launches a full-screen activity, the launcher activity is called with onStop(), and so the app shortcuts panel goes away. But, when a shortcut launches a dialog-themed activity, the launcher activity is not called with onStop() (since it is still visible), and so the app shortcuts panel remains.

Regardless, this behavior will vary by home screen (or other user of app shortcuts), and there is nothing much that you can really do about it.

like image 133
CommonsWare Avatar answered Nov 15 '22 06:11

CommonsWare