LK Yeung
LK Yeung

Reputation: 3496

android what is the different between InputMethodService.onKey and OnKeyboardActionListener.onkeydown

what is the different between InputMethodService.onKey and OnKeyboardActionListener.onkeydown

which method i need to use if i want to handle the handleCharacter

Upvotes: 1

Views: 854

Answers (3)

cylee
cylee

Reputation: 1

I think the onKeyDown is the hardkey listener and the onkey is the listener of the keyboard

you made.

Upvotes: 0

Terril Thomas
Terril Thomas

Reputation: 1506

InputMethodService provides a standard implementation of an InputMethod,Its help to inputdata Keyboard,user to draw text.OnKeyboardActionListener.onkeydown is used when u use the virtual keyboard in the device its gives the action on what is touched on the keyboard at that time.Similarly u can use onkeyup after the action is over.Handler are diffrent handler

Upvotes: 5

sam.wang.0723
sam.wang.0723

Reputation: 321

OnKeyboardActionListener.onkey and InputMethodService.onKeyDown I think.

Basically, you should use OnKeyboardActionListener.onkey, its designed as a key event listener, you should implement and override it.

Upvotes: 1

Related Questions