我正在使用谷歌VR for Android开发VR应用程序。 当我切换到双目模式(单击耳机按钮)时,出现以下屏幕:
如何避免此屏幕?
可以通过编程方式切换到双目模式吗?
谢谢, 基督教
答案 0 :(得分:1)
昨天我正努力达到你现在所寻求的相同结果。所以,我为此做了一个解决方法,我不知道它是否完美,但它在我的工作中起作用。
您需要做的就是获取VrVideoView的所有子视图,以便您可以相应地进行自定义。
Signature
获取所有子视图的递归方法:
Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
a = customerContact
b = salesExec
Dim Ebody As String
Ebody = "placeholder"
Ebody = Cells(3, 2) & "<br>" _
& "<br>" _
& "Dear, " & customerFirstName & "<br>" _
& "<br>" _
& Cells(7, 2) & "<br>" _
& "<br>" _
& Cells(9, 2) & "<br>" _
& "<br>" _
& Cells(11, 2) & "<br>" _
& "<br>" _
& Cells(13, 2)
'!---- NO LONGER NEEDED ----!>
'Signature = Environ("appdata") & "\Microsoft\Signatures\"
'If Dir(Signature, vbDirectory) <> vbNullString Then
' Signature = Signature & Dir$(Signature & "*.htm")
'Else:
' Signature = ""
'End If
' Signature = CreateObject("Scripting.FileSystemObject").GetFile(Signature).OpenAsTextStream(1, -2).ReadAll
'<!-------------------------!>
With OutMail
.GetInspector ' ## This inserts default signature
Signature = .HTMLBody ' ## Capture the signature HTML
.To = customerContact
.CC = ""
.BCC = salesExec
.Subject = "Welcome"
' In place of the following statement, you can use ".Display" to
' display the e-mail message.
'or if you dont want it to auto send.....change .send to .display
.HTMLBody = "<body style='font-family:calibri;font-size:11pt'>" _
& Ebody _
& "<br>" _
& Signature
.display
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Set OutMail = Nothing
Set OutApp = Nothing
我希望这可以解决你的问题。此外,您还可以通过调用相应的视图直接跳转到全屏模式。
答案 1 :(得分:0)
您可以尝试setTransitionViewEnabled(启用布尔值):https://developers.google.com/vr/android/reference/com/google/vr/sdk/base/GvrView.html#setTransitionViewEnabled(boolean)
在单声道和vr模式之间切换时,setVRModeEnabled(布尔启用):https://developers.google.com/vr/android/reference/com/google/vr/sdk/base/GvrView.html#setVRModeEnabled(boolean)