LanguagePack icon indicating copy to clipboard operation
LanguagePack copied to clipboard

Problems with ask attributes

Open Igetin opened this issue 6 years ago • 2 comments

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.

Igetin avatar Jul 01 '18 21:07 Igetin

@menny can you help out here? Is there any detailed documentation about the ask xml attributes?

friesenkiwi avatar Jul 04 '18 20:07 friesenkiwi

Any help on this?

Igetin avatar Sep 19 '18 20:09 Igetin