コード例 #1
0
 void HideBackgroundOverlay()
 {
     if (_backgroundOverlay != null)
     {
         _pageRenderer.RemoveView(_backgroundOverlay);
         _backgroundOverlay.Dispose();
         _backgroundOverlay = null;
     }
 }
コード例 #2
0
 void HideBackgroundOverlay ()
 {
     try {
         if (_backgroundOverlay != null) {
             _pageRenderer.RemoveView (_backgroundOverlay);
             _backgroundOverlay.Dispose ();
             _backgroundOverlay = null;
         }
     } catch (ObjectDisposedException) {
         // On Android, _backgroundOverlay was not null but HAD been disposed. Attempting to remove it caused an ObjectDisposedException
         _backgroundOverlay = null;
         // Swallow this - let anything else cause a problem
     }
 }