Julian
Julian

Reputation: 41

Android custom keyboard with strings

I want to customize the inputmethod keyboard with formula. When I press the key, the EditText can show the string such [#frac]. How can I implement it by android:codes. Please help me. Thank you very much for you.

Upvotes: 0

Views: 353

Answers (2)

Mika
Mika

Reputation: 41

Maybe you can try android:keyOutputText

eg. in custom keyboard when you press button "123", you get text 123

<Row>
    <Key android:codes="55"    android:keyLabel="7" android:keyEdgeFlags="left" />
    <Key android:codes="56"    android:keyLabel="8" />
    <Key android:codes="57"    android:keyLabel="9" android:keyEdgeFlags="right"/>
    <Key android:keyOutputText="123"  android:keyLabel="123" android:horizontalGap="6.25%p"/>
</Row>

More here

Upvotes: 0

Andrii Omelchenko
Andrii Omelchenko

Reputation: 13343

Take a look at:

1) Official documentation;

2) this tutorial;

3) that simple example.

Upvotes: 2

Related Questions