MAME4Droid runs the most MAME games on an Android device. To use the X-Arcade on it simply tap on the screen outside of the center window to bring up Settings. Under Settings>Input you will want to set External Controller to 'Keyboard or IME', and then define the controls under Settings>Input>Define Keys to the layout shown below.
MAME4All only plays a limited number of older MAME games compared to MAME4Droid. To use the X-Arcade on it simply click on 'OPTION' on the screen, choose Settings, then define keys. You will want to set the controls up as shown below.