Closed Nathipha closed 6 years ago
You could look at our GVRViewSceneObject class. Few demos use it; for example gvr-events, gvr-renderableview. You can pass your android view to it.
Thanks, I'll try it.
In the meantime I've solved it with a GVRTextViewSceneObject, there's no progress bar but it was updateable and looked similar (enough):
GVRTextViewSceneObject progressdialog = new GVRTextViewSceneObject(gvrc, 3f, 1f, "myText");
progressdialog.getTransform().setPosition(x, z, y);
progressdialog.setGravity(Gravity.CENTER | Gravity.CENTER);
progressdialog.setTextSize(5);
progressdialog.setTextColor(Color.BLACK);
progressdialog.setBackgroundColor(Color.WHITE);
scene.addSceneObject(progressdialog);
A ProgressDialog is a subclass of Dialog, so not sure how to get its View and if "Window.getCurrentFocus()" (which returns a View) doesn't just return the parent View, even if you do "progressdialog.show()" first.
I'm going to try it with that one anyway once I've updated (can't pass a View yet in the version I'm using).
@Nathipha Do you have other questions regarding this issue? If not, can we close it?
I haven't been able to update and test getting the View yet but for now there are no more questions. Thanks!
I'm using an AsyncTask to preload objects (read .obj files from storage and create GVRSceneObjects without adding them to the scene), so it doesn't just freeze the game, and a ProgressDialog to show the progress.
Since it only lets me use the standard Android context...
... the dialog spans the whole screen (similar to this):
https://i.imgur.com/vd5qISP.png?1
Does the Framework support any type of dialog like this in any version (I'm still on 3.0.1) or is there maybe a trick to get it to display properly within the borders of the two separate images? Or is creating your own dialogs what everyone's doing at this point?