LanguagePack
LanguagePack copied to clipboard
Problems with ask attributes
I'm having problems getting AnySoftKeyboard's custom ask
attributes to work in a LanguagePack build. There's no guidance on the readme on how these should be implemented, and very few existing packs seem to use it.
Here's an example. I cloned the latest commit and edited qwerty.xml
.
I added the namespace for the ask attributes:
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ask="http://schemas.android.com/apk/res-auto" android:keyWidth="10%p">
I also added an overriding bottom row to the layout:
<Row android:keyboardMode="@integer/keyboard_mode_normal" android:rowEdgeFlags="bottom" android:keyWidth="9.09%p" android:keyHeight="@integer/key_normal_height">
<Key android:keyWidth="13.635%p" android:codes="@integer/key_code_keyboard_mode_change" android:keyEdgeFlags="left"/>
<Key android:codes="8221" android:keyLabel="”" android:popupCharacters="’"/>
<Key android:codes="44" android:keyLabel=","/>
<Key android:codes="32" android:keyWidth="36.36%p"/>
<Key android:codes="46" android:keyLabel="."/>
<Key android:codes="45" android:keyLabel="-"/>
<Key android:codes="10" ask:longPressCode="-100" android:keyWidth="13.635%p" android:keyEdgeFlags="right"/>
</Row>
Everything else is unchanged.
The pack builds successfully, but ask:longPressCode="-100"
seems to do nothing. The settings dialog does not appear when long-pressing the enter key. I've tested on two different devices, one of which is running Oreo, and the other one is running Nougat.
I also tested the Turkish layouts, which use the ask:shiftedKeyLabel
attribute. However, the attribute does not work there either (the key does not display the specified character when shift is active).
Are these attributes not supposed to work in language packs, or am I just doing something wrong here? Better documentation would be highly appreciated.
@menny can you help out here? Is there any detailed documentation about the ask xml attributes?
Any help on this?