GDK : How to show status similar to 'Recording" and 'Complete" - google-glass

I'm developing a GDK app where I need to provide an user experience to display status text similar to video recording status that Glass provides ( displaying "Recording" status then displaying progress indicator and finally showing 'Complete' text ). Appreciate your input.

Right now, you'll need to write your own UI logic to do this (perhaps by using a Dialog with a custom layout that has the appropriate centered label and icon, with a progress bar at the bottom, and changing the label and dismissing the dialog when the action is complete).
You may want to follow issue 271 in our issue tracker, which covers the progress indicator part of this flow.

Tony is right. There is no way to do this naively but you can build it yourself. You can create a layout that is build exactly like the menu is built in the GDK, and then just update the setcontentview() with a new layout each time you want to move to the next card. Also you can build a layout with the holo horizontal progressbar to get the general idea but it won't be like the one Google uses.
Also wanted to add that I have built a repo that you can drop into your project for this. Here is the link: https://github.com/w9jds/GDK-ProgressBar

Related

Selenium webdriver - Find coordinates of tab navigated video player element for interaction

I'd like to automate a video-player on a webpage using Selenium in Python.
I cannot locate the interactive parts of the player with driver.find_element_by_... I've decided to try and accomplish this by making browser specific logic that knows how to navigate the page and player via keyboard navigation (count tabs for Chrome, vs Safari, vs Firefox, etc.).
driver.find_element_by_tag_name('body').send_keys(Keys.TAB))
I am able to select each of the controls of the player with tab (play/pause, current position, mute-volume control, full-screen, and additional options) and have had moderate success manipulating the player's controls with ActionChains once selected with TAB navigation
actions = ActionChains(driver)
actions.send_keys(Keys.DOWN) # to reduce volume or
actions.send_keys(Keys.LEFT) # to rewind playback
An example of something that doesn't work as expected with this method is sending a Key.SPACE to the MUTE button when selected. Instead the space is applied as a page navigation action and scrolls down the page like pressing page down. I'm looking for a method that either makes the controls work as expected when manually navigating the page with a keyboard, ex. space on highlighted object interacts and would normally mute the video in this context, or a workaround that lets me accomplish the same thing. To that end I was thinking if I could get the windows coordinates of the TAB selected object within the video-player and simply perform a click that would at least let me interact with the control.
Also if I'm going about this all the wrong way let me know. Thanks!
What you're really looking for is how to navigate the Shadow DOM. Those are the web elements inside the video player.
I answered how to reach inside the Shadow DOM in an other question, albeit for Java. However the principle is the same.
You can read the whole thing at the link, but the basics are you create a "starting point" WebElement at the Shadow DOM via JavaScript, then all future look-ups reference it:
WebElement button = startingPoint.findElement(By.cssSelector("..."));

React Native: Build a "Select Item from List" component

I want to build a "Picker Menu" inside a screen. I think the time picker popup components are not smooth enough to use, because they require extra clicks instead of just dragging to the wanted element.
The component should return the selected value + change the color of the selected value. I thought of ListView/ ScrollView, but I couldn't find a way to get that working yet.
Below: A great gimp graphic to show what the goal is, placing the Android Time Picker inside the screen as visual example.
That's what it could look like
Any ideas where to start? How can I build something like this with the React-Native components?
You can use react-native-wheel-picker or react-native-wheel-picker-android. These libraries provide wheel picker without opening any popup.

Google Glass: How to customize appearance of Home Screen and Menu Items on Google Glass?

Are you able to customize the appearance at all on the first two screens of Google Glass?
1) The Home screen card with time and "ok glass".
2) The Menu Item card with "ok glass," and a list of available voice actions.
For example, add an image, background image, remove the time, or add additional text. Or maybe put a custom view we create in front of everything.
I'm not looking to change the functionality, just the look and feel.
If not, are there any plans to allow this in the future?
Thanks!
It is not possible to change any of those screens. And I don't believe they will add the ability in the future. But we never know with Google, maybe in the future.
You can always make a feature request here:
https://code.google.com/p/google-glass-api/

How do I keep a button depressed in C++?

I want to create a navigation panel in my C++.net application, and I want to keep a button (or similar component) depressed to show that is the page the user is currently on.
Here is a image of what I mean:
How do I create a button that looks like that. (After further inspection, I think it's not a button, however, I cannot figure out the exact control unless it is a image drawn on the screen.)
Thanks.
That is commonly called an "Outlook Bar". There are several examples at codeproject.com

BlackBerry Cascades UI File Selection

I have set up a BlackBerry Cascades-UI project. I am using QML to define the look and feel of the user interface. I need to provide the user a method of selecting an image from the device photo gallery after the screen has been touched.
Does anyone have any idea on how to provide a list on the screen with all the images in the gallery and their appropriate names after a touch event has been triggered?
Perhaps someone would like to know even though nobody answered.
There currently is no Photo Gallery dialog (though it is announced and will probably be released in an update in the near future). However, it is possible to invoke a native file selection dialog from another thread. For more information about this, go to the support forums for Cascades and find a topic called: "Using native filebrowse and filesave dialog in Cascades".
Here is a link.
on beta 3, you can use file picker to select file(s)