File tree Expand file tree Collapse file tree 4 files changed +18
-2
lines changed
webview-nofragment/src/main/java/net/gree/unitywebview
webview/src/main/java/net/gree/unitywebview Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 11package net .gree .unitywebview ;
22
3+ import android .graphics .Color ;
34import android .graphics .Rect ;
45import android .os .Bundle ;
56import 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 );
Original file line number Diff line number Diff 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 );
Original file line number Diff line number Diff line change 11package net .gree .unitywebview ;
22
3+ import android .graphics .Color ;
34import android .graphics .Rect ;
45import android .os .Bundle ;
56import 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 );
Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments