public SurfaceView(android.content.Context context) : base(context) { mHandler = new _Handler_113(this); mScrollChangedListener = new _OnScrollChangedListener_131(this); mDrawListener = new _OnPreDrawListener_166(this); mSurfaceHolder = new _SurfaceHolder_682(this); init(); }
public SurfaceView(android.content.Context context, android.util.AttributeSet attrs , int defStyle) : base(context, attrs, defStyle) { mHandler = new _Handler_113(this); mScrollChangedListener = new _OnScrollChangedListener_131(this); mDrawListener = new _OnPreDrawListener_166(this); mSurfaceHolder = new _SurfaceHolder_682(this); init(); }
/// <summary>Remove a previously installed scroll-changed callback</summary> /// <param name="victim">The callback to remove</param> /// <exception cref="System.InvalidOperationException"> /// If /// <see cref="isAlive()">isAlive()</see> /// returns false /// </exception> /// <seealso cref="addOnScrollChangedListener(OnScrollChangedListener)">addOnScrollChangedListener(OnScrollChangedListener) /// </seealso> public void removeOnScrollChangedListener(android.view.ViewTreeObserver.OnScrollChangedListener victim) { checkIsAlive(); if (mOnScrollChangedListeners == null) { return; } mOnScrollChangedListeners.remove(victim); }
/// <summary>Register a callback to be invoked when a view has been scrolled.</summary> /// <remarks>Register a callback to be invoked when a view has been scrolled.</remarks> /// <param name="listener">The callback to add</param> /// <exception cref="System.InvalidOperationException"> /// If /// <see cref="isAlive()">isAlive()</see> /// returns false /// </exception> public void addOnScrollChangedListener(android.view.ViewTreeObserver.OnScrollChangedListener listener) { checkIsAlive(); if (mOnScrollChangedListeners == null) { mOnScrollChangedListeners = new java.util.concurrent.CopyOnWriteArrayList <android.view.ViewTreeObserver .OnScrollChangedListener>(); } mOnScrollChangedListeners.add(listener); }
public void removeOnScrollChangedListener(android.view.ViewTreeObserver.OnScrollChangedListener arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { @__env.CallVoidMethod(this.JvmHandle, global::android.view.ViewTreeObserver._removeOnScrollChangedListener9672, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } else { @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.view.ViewTreeObserver.staticClass, global::android.view.ViewTreeObserver._removeOnScrollChangedListener9672, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } }
/// <summary><p>Create a new popup window which can display the <tt>contentView</tt>. /// </summary> /// <remarks> /// <p>Create a new popup window which can display the <tt>contentView</tt>. /// The dimension of the window must be passed to this constructor.</p> /// <p>The popup does not provide any background. This should be handled /// by the content view.</p> /// </remarks> /// <param name="contentView">the popup's content</param> /// <param name="width">the popup's width</param> /// <param name="height">the popup's height</param> /// <param name="focusable">true if the popup can be focused, false otherwise</param> public PopupWindow(android.view.View contentView, int width, int height, bool focusable ) { mOnScrollChangedListener = new _OnScrollChangedListener_131(this); if (contentView != null) { mContext = contentView.getContext(); mWindowManager = (android.view.WindowManager)mContext.getSystemService(android.content.Context .WINDOW_SERVICE); } setContentView(contentView); setWidth(width); setHeight(height); setFocusable(focusable); }
/// <summary> /// <p>Create a new non focusable popup window which can display the /// <tt>contentView</tt>. /// </summary> /// <remarks> /// <p>Create a new non focusable popup window which can display the /// <tt>contentView</tt>. The dimension of the window must be passed to /// this constructor.</p> /// <p>The popup does not provide any background. This should be handled /// by the content view.</p> /// </remarks> /// <param name="contentView">the popup's content</param> /// <param name="width">the popup's width</param> /// <param name="height">the popup's height</param> public PopupWindow(android.view.View contentView, int width, int height) : this(contentView , width, height, false) { mOnScrollChangedListener = new _OnScrollChangedListener_131(this); }
/// <summary><p>Create a new empty, non focusable popup window.</summary> /// <remarks> /// <p>Create a new empty, non focusable popup window. The dimension of the /// window must be passed to this constructor.</p> /// <p>The popup does not provide any background. This should be handled /// by the content view.</p> /// </remarks> /// <param name="width">the popup's width</param> /// <param name="height">the popup's height</param> public PopupWindow(int width, int height) : this(null, width, height) { mOnScrollChangedListener = new _OnScrollChangedListener_131(this); }
/// <summary> /// <p>Create a new non focusable popup window which can display the /// <tt>contentView</tt>. /// </summary> /// <remarks> /// <p>Create a new non focusable popup window which can display the /// <tt>contentView</tt>. The dimension of the window are (0,0).</p> /// <p>The popup does not provide any background. This should be handled /// by the content view.</p> /// </remarks> /// <param name="contentView">the popup's content</param> public PopupWindow(android.view.View contentView) : this(contentView, 0, 0) { mOnScrollChangedListener = new _OnScrollChangedListener_131(this); }
/// <summary> /// <p>Create a new empty, non focusable popup window of dimension (0,0).</p> /// <p>The popup does not provide any background. /// </summary> /// <remarks> /// <p>Create a new empty, non focusable popup window of dimension (0,0).</p> /// <p>The popup does not provide any background. This should be handled /// by the content view.</p> /// </remarks> public PopupWindow() : this(null, 0, 0) { mOnScrollChangedListener = new _OnScrollChangedListener_131(this); }
/// <summary> /// <p>Create a new, empty, non focusable popup window of dimension (0,0).</p> /// <p>The popup does not provide a background.</p> /// </summary> public PopupWindow(android.content.Context context, android.util.AttributeSet attrs , int defStyleAttr, int defStyleRes) { mOnScrollChangedListener = new _OnScrollChangedListener_131(this); mContext = context; mWindowManager = (android.view.WindowManager)context.getSystemService(android.content.Context .WINDOW_SERVICE); android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected] .styleable.PopupWindow, defStyleAttr, defStyleRes); mBackground = a.getDrawable([email protected]_popupBackground ); int animStyle = a.getResourceId([email protected]_popupAnimationStyle , -1); mAnimationStyle = animStyle == [email protected]_PopupWindow ? -1 : animStyle; // If this is a StateListDrawable, try to find and store the drawable to be // used when the drop-down is placed above its anchor view, and the one to be // used when the drop-down is placed below its anchor view. We extract // the drawables ourselves to work around a problem with using refreshDrawableState // that it will take into account the padding of all drawables specified in a // StateListDrawable, thus adding superfluous padding to drop-down views. // // We assume a StateListDrawable will have a drawable for ABOVE_ANCHOR_STATE_SET and // at least one other drawable, intended for the 'below-anchor state'. if (mBackground is android.graphics.drawable.StateListDrawable) { android.graphics.drawable.StateListDrawable background = (android.graphics.drawable.StateListDrawable )mBackground; // Find the above-anchor view - this one's easy, it should be labeled as such. int aboveAnchorStateIndex = background.getStateDrawableIndex(ABOVE_ANCHOR_STATE_SET ); // Now, for the below-anchor view, look for any other drawable specified in the // StateListDrawable which is not for the above-anchor state and use that. int count = background.getStateCount(); int belowAnchorStateIndex = -1; { for (int i = 0; i < count; i++) { if (i != aboveAnchorStateIndex) { belowAnchorStateIndex = i; break; } } } // Store the drawables we found, if we found them. Otherwise, set them both // to null so that we'll just use refreshDrawableState. if (aboveAnchorStateIndex != -1 && belowAnchorStateIndex != -1) { mAboveAnchorBackgroundDrawable = background.getStateDrawable(aboveAnchorStateIndex ); mBelowAnchorBackgroundDrawable = background.getStateDrawable(belowAnchorStateIndex ); } else { mBelowAnchorBackgroundDrawable = null; mAboveAnchorBackgroundDrawable = null; } } a.recycle(); }
/// <summary> /// <p>Create a new empty, non focusable popup window of dimension (0,0).</p> /// <p>The popup does provide a background.</p> /// </summary> public PopupWindow(android.content.Context context, android.util.AttributeSet attrs , int defStyle) : this(context, attrs, defStyle, 0) { mOnScrollChangedListener = new _OnScrollChangedListener_131(this); }
/// <summary> /// <p>Create a new empty, non focusable popup window of dimension (0,0).</p> /// <p>The popup does provide a background.</p> /// </summary> public PopupWindow(android.content.Context context, android.util.AttributeSet attrs ) : this(context, attrs, [email protected]) { mOnScrollChangedListener = new _OnScrollChangedListener_131(this); }
/// <summary> /// <p>Create a new empty, non focusable popup window of dimension (0,0).</p> /// <p>The popup does provide a background.</p> /// </summary> public PopupWindow(android.content.Context context) : this(context, null) { mOnScrollChangedListener = new _OnScrollChangedListener_131(this); }