3

So I've got my little beginning of an app loading data from json into a CardScrollView. Sometimes this takes a few seconds, so I need a loading screen. Normally I'd do this with the progress action bar or a progress bar spinning around. I found a question around this:

https://stackoverflow.com/questions/20237873/google-glass-gdk-progress-indicator

So far so good, however I can't determine how to construct a layout for my activity so I see the progress loading and then when data load is finished, the card scroll view. What I'm doing now is first I set the loading view in the onCreate:

setContentView(mLoadingView)

Then later once the loader is finished I call:

mCardScrollView.activate()
setContentView(mCardScrollView)

Not only does this feel hackish, but it doesn't handle the case of reloading data. Normally I'd do this in android with a frame layout xml which would have the progress bar and list view in it and then toggle progress bar visibility / progress. But I'm not sure how to do this in glass. Maybe I'm not even following the right "glass paradigm". Any ideas?

Tony Allevato
  • 6,429
  • 1
  • 29
  • 34
johnarleyburns
  • 1,532
  • 12
  • 13

1 Answers1

1

Currently in the GDK sneak peek, you'll have to roll your own solution like you've already done. But you can track the feature request for a Glass-style progress here here on our issue tracker.

Tony Allevato
  • 6,429
  • 1
  • 29
  • 34