Popup Keyboard for Special Characters in Android
Popup Keyboard for Special Characters in Android
It turns out that when you hold down a key, Android gives you the option of popping up another keyboard. I figured out many of the details from Stack Overflow.Step 1
Create a new file called
xml/popup.xml
.<?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="0px"
android:keyHeight="60dp"
>
</Keyboard>
Step 2
Replace the correct line in
xml/keys_layout.xml
.
<Key android:codes="101" android:keyLabel="e" android:popupKeyboard="@xml/popup" android:popupCharacters="éèêë"/>
Step 3
Add the following code to your Java.
<Key android:codes="101" android:keyLabel="e" android:popupKeyboard="@xml/popup" android:popupCharacters="éèêë"/>
That's it!
Comments
Post a Comment