Watchmaker Wiki

The ultimate watch maker for Android Wear!

User Tools

Site Tools


tips:tickertext

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
tips:tickertext [2015/05/27 12:13] jt3tips:tickertext [2015/05/27 13:55] (current) jt3
Line 66: Line 66:
 The second method is a lot more battery and processor friendly, and the scroll speed is measured in seconds, making it consistent across devices, but the major disadvantage is that the text must completely scroll out of sight before it can start up again, because there is a slight delay as you recall the function (which restarts the scrolling text... as each function call only scrolls the text one time). The second method is a lot more battery and processor friendly, and the scroll speed is measured in seconds, making it consistent across devices, but the major disadvantage is that the text must completely scroll out of sight before it can start up again, because there is a slight delay as you recall the function (which restarts the scrolling text... as each function call only scrolls the text one time).
  
-Here, we start by defining some initial values for certain variables (mainly to prevent "null" errors), but in the case of "tweens.scroll," we're going to "restart" it every time the value reaches the maximum value, so we need to initially set it to a value higher than it will ever be in normal use.  Thus, it will immediately trigger our first function call by being higher than it should be.+Here, we again start by defining some initial values for certain variables (mainly to prevent "null" errors), but in the case of "tweens.scroll," we're going to "restart" it every time the value reaches the maximum value, so we need to initially set it to a value higher than it will ever be in normal use.  Thus, it will immediately trigger our first function call by being higher than it should be.  The speed control here is var_speed, and is in seconds (as in, how many seconds it will take to fully scroll the text).
  
 The function, in this case is simply a "tween" animation, so it's easy to understand.  Essentially, we do the same thing as in the "on_millisecond" method, but we use a standard function call to determine how long the display window should be, and we must recall that function every time we want to loop.  This is best for screens that won't always be visible, such as weather screens that are called by tap action.  Thus, the scrolling only happens when necessary, saving processor and battery. The function, in this case is simply a "tween" animation, so it's easy to understand.  Essentially, we do the same thing as in the "on_millisecond" method, but we use a standard function call to determine how long the display window should be, and we must recall that function every time we want to loop.  This is best for screens that won't always be visible, such as weather screens that are called by tap action.  Thus, the scrolling only happens when necessary, saving processor and battery.
tips/tickertext.txt · Last modified: 2015/05/27 13:55 by jt3