I'd want to simulate task switcher softkey of our ICS Android devices and detect when user clicks that softkey.

Is there a way?

有帮助吗?

解决方案

AFAIK you can't do that. However, it isn't super hard to roll your own. getRecentTasks() returns a list of recently run apps. Simply retrieve these, and show them in your own UI.

One advantage to this is that the default one, at least on older versions of Android, only shows you about 8 apps. If you roll your own can show as many as you want.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top