wonjsohn / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
0 stars 0 forks source link

Livecard focus/blur/show/hide events #570

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Right now, live cards can't tell whether or not they're visible. So if you make 
a live card that's expensive to render, it will keep rendering even if the user 
is looking at an unrelated card, with battery implications. This also means 
that live cards can't intercept the wink gesture intent, without also 
intercepting it everywhere else.

The simple solution is to add events informing live cards' owners when they 
become focused, blurred, shown, or hidden. ("Focus" means the card is the 
present card, and the user is not part-way through a swipe. "Shown" means at 
least one pixel is visible, which does not necessarily imply being focused, if 
the user is swiping. Live cards will want to paint iff they're visible, and 
intercept intents iff they're focused.)

Original issue reported on code.google.com by jimrandomh@gmail.com on 14 Jul 2014 at 9:35

GoogleCodeExporter commented 8 years ago
Hello,

While this class won't give as much fine-grained events as requested, you 
should be able to use the DirectRenderingCallback 
(https://developers.google.com/glass/develop/gdk/reference/com/google/android/gl
ass/timeline/DirectRenderingCallback) to know when it is unnecessary to render.

Using this class would solve the first issue about doing expensive rendering in 
the background.

Setting this issue as a duplicate of 286 for the other requests.

Best,
Alain

Original comment by ala...@google.com on 15 Jul 2014 at 3:31