Skip to content
Advertisement

Android handle virtual Direction pad on screen to focus view

I’m developing an app can visible Direction pad on the screen, but I don’t know how to handle or override action like UP, DOWN, LEFT, RIGHT to focus the next view (like some buttons in image below).

Here are image description

Advertisement

Answer

I found a solution to what I need here Android simulate key press . Use Instrumentation class to sendKeyEvent.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement