Search code examples
androidonclickandroid-4.0-ice-cream-sandwichsoftkeys

Android: How to show ics task switcher or detect if user clicks that softkey?


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

Is there a way?


Solution

  • 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.