mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Fix a few GVR 360 nits
- Remove unused TAG - android.Theme.Material can only be used from API level 21 - Rm "Base" from activity name for consistency PiperOrigin-RevId: 233410603
This commit is contained in:
parent
ae12b76ac4
commit
71ab19c771
3 changed files with 24 additions and 8 deletions
|
|
@ -50,9 +50,8 @@ import com.google.vr.sdk.controller.ControllerManager;
|
||||||
import javax.microedition.khronos.egl.EGLConfig;
|
import javax.microedition.khronos.egl.EGLConfig;
|
||||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
|
|
||||||
/** VR 360 video player base activity class. */
|
/** Base activity for VR 360 video playback. */
|
||||||
public abstract class BaseGvrPlayerActivity extends GvrActivity {
|
public abstract class GvrPlayerActivity extends GvrActivity {
|
||||||
private static final String TAG = "GvrPlayerActivity";
|
|
||||||
|
|
||||||
private static final int EXIT_FROM_VR_REQUEST_CODE = 42;
|
private static final int EXIT_FROM_VR_REQUEST_CODE = 42;
|
||||||
|
|
||||||
|
|
@ -66,7 +65,7 @@ public abstract class BaseGvrPlayerActivity extends GvrActivity {
|
||||||
@MonotonicNonNull private SceneRenderer scene;
|
@MonotonicNonNull private SceneRenderer scene;
|
||||||
@MonotonicNonNull private PlayerControlView playerControl;
|
@MonotonicNonNull private PlayerControlView playerControl;
|
||||||
|
|
||||||
public BaseGvrPlayerActivity() {
|
public GvrPlayerActivity() {
|
||||||
mainHandler = new Handler(Looper.getMainLooper());
|
mainHandler = new Handler(Looper.getMainLooper());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -348,7 +347,7 @@ public abstract class BaseGvrPlayerActivity extends GvrActivity {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (!appButtonDown && controller.appButtonState) {
|
} else if (!appButtonDown && controller.appButtonState) {
|
||||||
glView.post(BaseGvrPlayerActivity.this::togglePlayerControlVisibility);
|
glView.post(GvrPlayerActivity.this::togglePlayerControlVisibility);
|
||||||
}
|
}
|
||||||
appButtonDown = controller.appButtonState;
|
appButtonDown = controller.appButtonState;
|
||||||
}
|
}
|
||||||
18
extensions/gvr/src/main/res/values-v21/styles.xml
Normal file
18
extensions/gvr/src/main/res/values-v21/styles.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2018 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<style name="VrTheme" parent="android:Theme.Material"/>
|
||||||
|
</resources>
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Copyright (C) 2018 The Android Open Source Project
|
<!-- Copyright (C) 2019 The Android Open Source Project
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<!-- Android Views rendered in VR should use a theme that matches the rest of the VR UI.-->
|
|
||||||
<resources>
|
<resources>
|
||||||
<style name="VrTheme" parent="android:Theme.Material"/>
|
<style name="VrTheme" parent="android:Theme.Holo"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue