protected internal override void onDetachedFromWindow() { if (mGlobalListenersAdded) { android.view.ViewTreeObserver observer = getViewTreeObserver(); observer.removeOnScrollChangedListener(mScrollChangedListener); observer.removeOnPreDrawListener(mDrawListener); mGlobalListenersAdded = false; } mRequestedVisible = false; updateWindow(false, false); mHaveFrame = false; if (mWindow != null) { try { mSession.remove(mWindow); } catch (android.os.RemoteException) { } // Not much we can do here... mWindow = null; } mSession = null; mLayout.token = null; base.onDetachedFromWindow(); }
protected internal override void onAttachedToWindow() { base.onAttachedToWindow(); mParent.requestTransparentRegion(this); mSession = getWindowSession(); mLayout.token = getWindowToken(); mLayout.setTitle(java.lang.CharSequenceProxy.Wrap("SurfaceView")); mViewVisibility = getVisibility() == VISIBLE; if (!mGlobalListenersAdded) { android.view.ViewTreeObserver observer = getViewTreeObserver(); observer.addOnScrollChangedListener(mScrollChangedListener); observer.addOnPreDrawListener(mDrawListener); mGlobalListenersAdded = true; } }
protected internal override void onDetachedFromWindow() { if (mGlobalListenersAdded) { android.view.ViewTreeObserver observer = getViewTreeObserver(); observer.removeOnScrollChangedListener(mScrollChangedListener); observer.removeOnPreDrawListener(mDrawListener); mGlobalListenersAdded = false; } mRequestedVisible = false; updateWindow(false, false); mHaveFrame = false; if (mWindow != null) { try { mSession.remove(mWindow); } catch (android.os.RemoteException) { } // Not much we can do here... mWindow = null; } mSession = null; mLayout.token = null; base.onDetachedFromWindow(); }
protected internal override void onAttachedToWindow() { base.onAttachedToWindow(); mParent.requestTransparentRegion(this); mSession = getWindowSession(); mLayout.token = getWindowToken(); mLayout.setTitle(java.lang.CharSequenceProxy.Wrap("SurfaceView")); mViewVisibility = getVisibility() == VISIBLE; if (!mGlobalListenersAdded) { android.view.ViewTreeObserver observer = getViewTreeObserver(); observer.addOnScrollChangedListener(mScrollChangedListener); observer.addOnPreDrawListener(mDrawListener); mGlobalListenersAdded = true; } }
public virtual void setSession(android.view.IWindowSession session) { throw new System.NotImplementedException(); }