Watchmaker Wiki

The ultimate watch maker for Android Wear!

User Tools

Site Tools


tips:textshortening

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tips:textshortening [2015/01/24 06:23]
rahul_pawa
tips:textshortening [2015/01/24 06:36]
rahul_pawa [Intro]
Line 14: Line 14:
  
    string.format('%s %-.18s%s', '{c1b}', string.sub('{c1t}', 1, 15), string.len('{c1t}')>18 and '...' or string.sub('{c1t}',16,18))    string.format('%s %-.18s%s', '{c1b}', string.sub('{c1t}', 1, 15), string.len('{c1t}')>18 and '...' or string.sub('{c1t}',16,18))
 +
 +===== Intro =====
 +
 +If you display three event text on your watch face, you may find times when the text is just too long.
 +
 +You //could// handle this problem by editing the event in your calendar, or simply ignoring it. After all, it will go away in a few hours. With a little code, you can instead be prepared for this inevitability.
 +
 +The examples on this page use string functions in LUA to limit the length of the event text. If you want to use the examples as is, you can copy them into the text field where you display the event text.
 +
 +===== Explanation of Examples =====
 +
 +(Coming Soon)
 +
tips/textshortening.txt ยท Last modified: 2015/01/24 06:36 by rahul_pawa