/// <summary> /// Get the AppWidgetManager instance to use for the supplied /// <see cref="android.content.Context">Context</see> /// object. /// </summary> public static android.appwidget.AppWidgetManager getInstance(android.content.Context context) { lock (sManagerCache) { if (sService == null) { android.os.IBinder b = android.os.ServiceManager.getService(android.content.Context .APPWIDGET_SERVICE); sService = android.appwidget.@internal.IAppWidgetServiceClass.Stub.asInterface(b); } [email protected] <android.appwidget.AppWidgetManager> @ref = sManagerCache .get(context); android.appwidget.AppWidgetManager result = null; if (@ref != null) { result = @ref.get(); } if (result == null) { result = new android.appwidget.AppWidgetManager(context); sManagerCache.put(context, new [email protected] <android.appwidget.AppWidgetManager >(result)); } return(result); } }
public virtual void release() { if (mResolver != null) { android.content.ContentResolver contentResolver = mResolver.get(); if (contentResolver != null) { contentResolver.unregisterContentObserver(mObserver); mResolver.clear(); } mObserver = null; mResolver = null; mPrefsInited = false; } }
/// <summary> /// Inflates the layout resource identified by /// <see cref="getLayoutResource()">getLayoutResource()</see> /// and replaces this StubbedView in its parent by the inflated layout resource. /// </summary> /// <returns>The inflated layout resource.</returns> public android.view.View inflate() { android.view.ViewParent viewParent = getParent(); if (viewParent != null && viewParent is android.view.ViewGroup) { if (mLayoutResource != 0) { android.view.ViewGroup parent = (android.view.ViewGroup)viewParent; android.view.LayoutInflater factory = android.view.LayoutInflater.from(mContext); android.view.View view = factory.inflate(mLayoutResource, parent, false); if (mInflatedId != NO_ID) { view.setId(mInflatedId); } int index = parent.indexOfChild(this); parent.removeViewInLayout(this); android.view.ViewGroup.LayoutParams layoutParams = getLayoutParams(); if (layoutParams != null) { parent.addView(view, index, layoutParams); } else { parent.addView(view, index); } mInflatedViewRef = new [email protected] <android.view.View>(view); if (mInflateListener != null) { mInflateListener.onInflate(this, view); } return(view); } else { throw new System.ArgumentException("ViewStub must have a valid layoutResource"); } } else { throw new System.InvalidOperationException("ViewStub must have a non-null ViewGroup viewParent" ); } }
/// <summary>Creates or retrieves a ColorStateList that always returns a single color. /// </summary> /// <remarks>Creates or retrieves a ColorStateList that always returns a single color. /// </remarks> public static android.content.res.ColorStateList valueOf(int color) { // TODO: should we collect these eventually? lock (sCache) { [email protected] <android.content.res.ColorStateList> @ref = sCache.get (color); android.content.res.ColorStateList csl = @ref != null? @ref.get() : null; if (csl != null) { return(csl); } csl = new android.content.res.ColorStateList(EMPTY, new int[] { color }); sCache.put(color, new [email protected] <android.content.res.ColorStateList >(csl)); return(csl); } }
public ButtonHandler(android.content.DialogInterface dialog) { // Button clicks have Message.what as the BUTTON{1,2,3} constant mDialog = new [email protected] <android.content.DialogInterface>(dialog ); }
internal InnerConnection(android.app.LoadedApk.ServiceDispatcher sd) { mDispatcher = new [email protected]<android.app.LoadedApk.ServiceDispatcher >(sd); }
public ChangeWatcher(android.text.DynamicLayout layout) { mLayout = new [email protected] <android.text.DynamicLayout>(layout); }
/// <summary> /// Bind a /// <see cref="Callback">Callback</see> /// object to this Drawable. Required for clients /// that want to support animated drawables. /// </summary> /// <param name="cb">The client's Callback implementation.</param> /// <seealso cref="getCallback()"></seealso> public void setCallback(android.graphics.drawable.Drawable.Callback cb) { mCallback = new [email protected]<android.graphics.drawable.Drawable.Callback >(cb); }
public MyWindow(android.view.SurfaceView surfaceView) { mSurfaceView = new [email protected]<android.view.SurfaceView>(surfaceView ); }
private void unregisterForScrollChanged() { [email protected]<android.view.View> anchorRef = mAnchor; android.view.View anchor = null; if (anchorRef != null) { anchor = anchorRef.get(); } if (anchor != null) { android.view.ViewTreeObserver vto = anchor.getViewTreeObserver(); vto.removeOnScrollChangedListener(mOnScrollChangedListener); } mAnchor = null; }
private void registerForScrollChanged(android.view.View anchor, int xoff, int yoff ) { unregisterForScrollChanged(); mAnchor = new [email protected]<android.view.View>(anchor); android.view.ViewTreeObserver vto = anchor.getViewTreeObserver(); if (vto != null) { vto.addOnScrollChangedListener(mOnScrollChangedListener); } mAnchorXoff = xoff; mAnchorYoff = yoff; }
public override void setCustomView(android.view.View view) { this._enclosing.mContextView.setCustomView(view); this.mCustomView = new [email protected]<android.view.View>(view); }
public ChangeWatcher(android.text.DynamicLayout layout) { mLayout = new [email protected]<android.text.DynamicLayout>(layout); }
internal virtual void setTransformAnimator(android.animation.ObjectAnimator oa) { transformAnimator = new [email protected]<android.animation.ObjectAnimator >(oa); }
/// <summary> /// Inflates the layout resource identified by /// <see cref="getLayoutResource()">getLayoutResource()</see> /// and replaces this StubbedView in its parent by the inflated layout resource. /// </summary> /// <returns>The inflated layout resource.</returns> public android.view.View inflate() { android.view.ViewParent viewParent = getParent(); if (viewParent != null && viewParent is android.view.ViewGroup) { if (mLayoutResource != 0) { android.view.ViewGroup parent = (android.view.ViewGroup)viewParent; android.view.LayoutInflater factory = android.view.LayoutInflater.from(mContext); android.view.View view = factory.inflate(mLayoutResource, parent, false); if (mInflatedId != NO_ID) { view.setId(mInflatedId); } int index = parent.indexOfChild(this); parent.removeViewInLayout(this); android.view.ViewGroup.LayoutParams layoutParams = getLayoutParams(); if (layoutParams != null) { parent.addView(view, index, layoutParams); } else { parent.addView(view, index); } mInflatedViewRef = new [email protected]<android.view.View>(view); if (mInflateListener != null) { mInflateListener.onInflate(this, view); } return view; } else { throw new System.ArgumentException("ViewStub must have a valid layoutResource"); } } else { throw new System.InvalidOperationException("ViewStub must have a non-null ViewGroup viewParent" ); } }
internal InnerConnection(android.app.LoadedApk.ServiceDispatcher sd) { mDispatcher = new [email protected] <android.app.LoadedApk.ServiceDispatcher >(sd); }
internal virtual void setSliderAnimator(android.animation.ObjectAnimator oa) { sliderAnimator = new [email protected]<android.animation.ObjectAnimator >(oa); }
public MyWindow(android.view.SurfaceView surfaceView) { mSurfaceView = new [email protected] <android.view.SurfaceView>(surfaceView ); }
public override void setCustomView(android.view.View view) { this._enclosing.mContextView.setCustomView(view); this.mCustomView = new [email protected] <android.view.View>(view); }