Update text of card in Google Glass using GDK?
Asked Answered
S

1

7

I'm interested in changing the text of a card based on some event. Is it possible to change the text of card without calling setContentView() on the Activity?

Once the card has been converted into view and set using setContentView(), I haven't found a way to change its contents without calling 'setContentView()' again.

Slivovitz answered 24/1, 2014 at 11:39 Comment(0)
X
5

The getView() method of the Card builder class returns an Android View version of the Card that is a snapshot.

Modifying the original Card will not modify the View you retrieved earlier. This means that the only way to update your content view is to generate a new View with getView() and set it with setContentView().

Xenophon answered 24/1, 2014 at 16:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.