I have custom Android keyboard:
public class CustomKeyboard extends Keyboard{...}
public class CustomKeyboardView extends KeyboardView{...}
public class CustomKeyboardIME extends InputMethodService implements KeyboardView.OnKeyboardActionListener{...}
On some keys, I have popupKeyboard
and popupCharacters
:
<Key android:codes="144" android:keyLabel="0" android:popupKeyboard="@xml/key_popup" android:popupCharacters=")" android:keyEdgeFlags="right"/>
xml/key_popup.xml:
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:keyHeight="@dimen/key_height" >
</Keyboard>
But when I longPress on "0" key popup with ")" shows, but it stays there until I press "X" button or ")" character. It looks like this:
And I want it to be opened only while I am holding a finger on. Something like on Samsung or HTC keyboard:
Can someone help me please?
EDIT Is it at least possible to change the appearance of this popup? I want it to have same background and keys as whole keyboard I have made/