java - How to disable android hiding an activity on keycode_button_... events? -


i'm using rooted tabled usb port in host mode read value of xbox-controller-joystick (with onjoystickmotion).

now, want track buttons keycode_button_a, keycode_button_b, keycode_button_x, keycode_button_y , keycode_button_select. tracking working, pressing these buttons hide activity.

is there way disable android hiding activity on keycode_button_... events?

@override public boolean dispatchkeyevent(keyevent event) {     inputdevicestate state = getinputdevicestate(event);     if (state != null) {         switch (event.getaction()) {             case keyevent.action_down:                 if (state.onkeydown(event)) {                     //do thing                 }                 break;             case keyevent.action_up:                 if (state.onkeyup(event)) {                     //do thing                 }                 break;         }         return true;     }     return super.dispatchkeyevent(event); } 

yeah :d


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -