Only receive long pressed key events

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

Only receive long pressed key events

Postby Fr4gg0r » Sun Jun 27, 2010 2:59 am

Hi,
I want to know if the user presses the Back or Menu key long.
The problem is, if onKeyDown returns true, this happens because I don't want the activity to close when the user presses Back in short-term, onKeyLongPress is not called.

Anybody knows a Workaround? :?
Fr4gg0r
Freshman
Freshman
 
Posts: 6
Joined: Tue Feb 02, 2010 11:28 am

Top

Re: Only receive long pressed key events

Postby anarche » Sun Jun 27, 2010 10:22 pm

Google. It took me 3 seconds and the first link I found
anarche
Master Developer
Master Developer
 
Posts: 369
Joined: Sun Apr 11, 2010 5:21 am

Re: Only receive long pressed key events

Postby Fr4gg0r » Sun Jun 27, 2010 10:31 pm

I googled, but I did not find it.
Nevertheless I got an answer in another forum.
Fr4gg0r
Freshman
Freshman
 
Posts: 6
Joined: Tue Feb 02, 2010 11:28 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 25 guests