Reputation: 687
I just load Android Sample project "Samplesoftkeyboard"
I edited symbols.xml into my custom like pattern
now the problem is
if user pressed some combination of keys i need to display some Character
How can i do that ?
EDIT: if user type some combinations to key i need to show some different characters eg: if user press *45@ then i need to change as A when user type @ symbol in that keyboard
Upvotes: 0
Views: 81
Reputation: 3927
Create a file in xml
with the name popup.xml
and insert following code:
<?xml version="1.0" encoding="UTF-8"?>
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="5%p"
android:keyHeight="@dimen/key_height">
</Keyboard>
In your keyboard layout file (something like qwerty.xml
) you have to edit the key the following way to get a popup with a definded selection of suggestions:
<Key android:codes="117" android:keyLabel="u"
android:popupKeyboard="@xml/popup"
android:popupCharacters="ü"/>
Upvotes: 1