1

I have a keyboard on the screen (As a component inside LinearLayout. So it's always on the screen.) I'm developing the app on an Amazon FireTV so I made an onscreen keyboard where I can use DPAD for navigation. It all works great except the highlight seems to persist even when I'm not focusing on the keyboard.

import android.inputmethodservice.Keyboard;
import android.inputmethodservice.KeyboardView;

private KeyboardView mKeyboardView;
private Keyboard mKeyboard;

mKeyboard = new Keyboard(getActivity(), R.xml.search_keyboard);
mKeyboardView = (KeyboardView) view.findViewById(R.id.keyboard);
mKeyboardView.setKeyboard(mKeyboard);

Below the keyboard is a focusable view. When I select the new view, I expect the key highlight on the keyboard to go away. But that's not happening. (If I was selecting K, K would be highlighted in yellow (This is expected) but when I navigate away from the keyboard, the highlight will stay as if the keyboard is still focused.

Any insights will be much appreciated. Thank you!

Dreamingwhale
  • 433
  • 6
  • 22
  • How did you get the highlight working on the on screen keyboard? I mean the dpad keys should move focus from one key to another, how did you manage that? – Ronak Khandelwal Jul 22 '17 at 05:26
  • @RonakKhandelwal I'm gonna be honest with you I don't remember anymore. But I'm pretty sure it just worked like that out of the box. I didn't do anything extra to get it to do that. – Dreamingwhale Jul 24 '17 at 19:04
  • is your keyboard open source? If yes I'd be grateful if you could allow me to have a look at that I'm facing some issues handling the dpad keys – Ronak Khandelwal Jul 25 '17 at 04:35

0 Answers0