Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disable Keys

 
chetan dhumane
Ranch Hand
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can we disable back key,home key of emulator.
 
Mark L. Murphy
Author
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can intercept the back key via onKeyDown() in an activity and have it do something other than finish the current activity. Please bear in mind that users typically expect the back button to work as it does with other applications, so be sure that you want to change this behavior.

You cannot intercept the home key, however.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic