Tabris 1.4 Preview: Text Replacement

Tabris 1.4 Preview: Text Replacement

Only 10 days left till we release Tabris 1.4. This week we want to give you a preview of a feature highly requested by some of our customers: Text Replacement.

Typing on mobile devices is not as efficient as on desktop computers because of the lack of hardware keyboards. You can increase the efficiency by defining shortcuts within your mobile OS that will be replaced while you are typing. E.g. you can define “yolo” as a shortcut that will be replaced with “You only live once” when you type it. With Tabris 1.4 you can define shortcuts on a “per text field” level. This means you have very fine control over your shortcuts and UI controls. The code you need to write to define shortcuts is using our Widget enhancements mechanism. A simple example looks like this:

TextReplacementData data = new TextReplacementData();
data.put( "yolo", "You only live once" );
data.put( "hodor", "hodor hodor hodor" );
data.put( "lol", "laughing out loud" );
Widgets.onText( text ).setTextReplacement( data );

The first thing you need to define is the TextReplacementData. Basically this is a key-value map. With the Widgets.onText API you can set it on a text field. After that, the client behaves like in the screenshot below.

text-replacement

That’s it for Text Replacement. There is a lot more to come in Tabris 1.4 so stay tuned for the final release on June 26th.

Please Note: The feature described above is a preview of the upcoming Tabris 1.4 features. Tabris 1.4 will be available on June 26th 2014. If you want to try it out before the release, just send us a quick request.

No Comments

Sorry, the comment form is closed at this time.