Skip to content

Commit 1ae7e8e

Browse files
committed
made CUnityAndroidActivity opaque and fixed about layout.setBackgroundColor().
1 parent 93f36f5 commit 1ae7e8e

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

plugins/Android/webview-nofragment/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package net.gree.unitywebview;
22

3+
import android.graphics.Color;
34
import android.graphics.Rect;
45
import android.os.Bundle;
56
import android.util.Log;
@@ -15,6 +16,13 @@ public class CUnityPlayerActivity
1516
private List<WebView> _webViews = new ArrayList<WebView>();
1617
private List<Rect> _masks = new ArrayList<Rect>();
1718

19+
@Override
20+
protected void onCreate(Bundle savedInstanceState)
21+
{
22+
super.onCreate(savedInstanceState);
23+
getWindow().getDecorView().setBackgroundColor(Color.BLACK);
24+
}
25+
1826
@Override
1927
public boolean dispatchTouchEvent(MotionEvent event) {
2028
boolean ret = super.dispatchTouchEvent(event);

plugins/Android/webview-nofragment/src/main/java/net/gree/unitywebview/CWebViewPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ public void Destroy() {
619619
webView.stopLoading();
620620
if (mVideoView != null) {
621621
layout.removeView(mVideoView);
622-
layout.setBackgroundColor(0x00000000);
622+
layout.setBackgroundColor(0xff000000);
623623
mVideoView = null;
624624
}
625625
layout.removeView(webView);

plugins/Android/webview/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package net.gree.unitywebview;
22

3+
import android.graphics.Color;
34
import android.graphics.Rect;
45
import android.os.Bundle;
56
import android.util.Log;
@@ -15,6 +16,13 @@ public class CUnityPlayerActivity
1516
private List<WebView> _webViews = new ArrayList<WebView>();
1617
private List<Rect> _masks = new ArrayList<Rect>();
1718

19+
@Override
20+
protected void onCreate(Bundle savedInstanceState)
21+
{
22+
super.onCreate(savedInstanceState);
23+
getWindow().getDecorView().setBackgroundColor(Color.BLACK);
24+
}
25+
1826
@Override
1927
public boolean dispatchTouchEvent(MotionEvent event) {
2028
boolean ret = super.dispatchTouchEvent(event);

plugins/Android/webview/src/main/java/net/gree/unitywebview/CWebViewPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ public void Destroy() {
937937
webView.stopLoading();
938938
if (mVideoView != null) {
939939
layout.removeView(mVideoView);
940-
layout.setBackgroundColor(0x00000000);
940+
layout.setBackgroundColor(0xff000000);
941941
mVideoView = null;
942942
}
943943
layout.removeView(webView);

0 commit comments

Comments
 (0)