Home key event

Put your problem here if it does not fit any of the other categories.

Home key event

Postby sarangkulkarni17 » Wed Mar 04, 2009 7:09 am

can anybody tell me how to detect HOME key event in activiy?
i wote this function still not getting the event :(

public boolean onKeyDown(int keyCode, KeyEvent event)
{
if(keyCode==KeyEvent.KEYCODE_HOME)
{
System.out.println("Home key pressed");
finish();
}

return false;
}
sarangkulkarni17
Developer
Developer
 
Posts: 29
Joined: Fri Feb 13, 2009 10:00 am
Location: Pune

Top

Re: Home key event

Postby sarangkulkarni17 » Fri Mar 13, 2009 10:24 am

Can anybody tell me??
sarangkulkarni17
Developer
Developer
 
Posts: 29
Joined: Fri Feb 13, 2009 10:00 am
Location: Pune

Postby MrSnowflake » Fri Mar 13, 2009 10:38 am

I read that you can't change the HOME behavior, because Google wants the home button to always work the same.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 12 guests