Example #1
0
 public virtual void unregisterDataSetObserver(android.database.DataSetObserver observer
                                               )
 {
     if (mAdapter != null)
     {
         mAdapter.unregisterDataSetObserver(observer);
     }
 }
Example #2
0
 /// <summary>Constructs the connector</summary>
 public ExpandableListConnector(android.widget.ExpandableListAdapter expandableListAdapter
                                )
 {
     mDataSetObserver = new android.widget.ExpandableListConnector.MyDataSetObserver(this
                                                                                     );
     mExpGroupMetadataList = new java.util.ArrayList <android.widget.ExpandableListConnector
                                                      .GroupMetadata>();
     setExpandableListAdapter(expandableListAdapter);
 }
Example #3
0
 void android.database.Cursor.unregisterDataSetObserver(android.database.DataSetObserver arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.database.Cursor_._unregisterDataSetObserver2595, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.database.Cursor_.staticClass, global::android.database.Cursor_._unregisterDataSetObserver2595, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
 }
Example #4
0
 public virtual void unregisterDataSetObserver(android.database.DataSetObserver arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.widget.BaseExpandableListAdapter._unregisterDataSetObserver11029, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.widget.BaseExpandableListAdapter.staticClass, global::android.widget.BaseExpandableListAdapter._unregisterDataSetObserver11029, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
 }
Example #5
0
 public override void registerDataSetObserver(android.database.DataSetObserver arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.database.sqlite.SQLiteCursor._registerDataSetObserver2806, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.database.sqlite.SQLiteCursor.staticClass, global::android.database.sqlite.SQLiteCursor._registerDataSetObserver2806, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
 }
Example #6
0
 void android.widget.Adapter.registerDataSetObserver(android.database.DataSetObserver arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.widget.SpinnerAdapter_._registerDataSetObserver12002, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.widget.SpinnerAdapter_.staticClass, global::android.widget.SpinnerAdapter_._registerDataSetObserver12002, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
 }
Example #7
0
 /// <summary>Create a new instance.</summary>
 /// <remarks>Create a new instance.</remarks>
 /// <param name="context">The application environment.</param>
 /// <param name="attrs">A collection of attributes.</param>
 /// <param name="defStyle">The default style to apply to this view.</param>
 public ActivityChooserView(android.content.Context context, android.util.AttributeSet
                            attrs, int defStyle) : base(context, attrs, defStyle)
 {
     mModelDataSetOberver    = new _DataSetObserver_118(this);
     mOnGlobalLayoutListener = new _OnGlobalLayoutListener_132(this);
     android.content.res.TypedArray attributesArray = context.obtainStyledAttributes(attrs
                                                                                     , [email protected], defStyle, 0);
     mInitialActivityCount = attributesArray.getInt([email protected]_initialActivityCount
                                                    , android.widget.ActivityChooserView.ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_DEFAULT
                                                    );
     android.graphics.drawable.Drawable expandActivityOverflowButtonDrawable = attributesArray
                                                                               .getDrawable([email protected]_expandActivityOverflowButtonDrawable
                                                                                            );
     attributesArray.recycle();
     android.view.LayoutInflater inflater = android.view.LayoutInflater.from(mContext);
     inflater.inflate([email protected]_chooser_view, this, true);
     mCallbacks = new android.widget.ActivityChooserView.Callbacks(this);
     mActivityChooserContent = (android.widget.LinearLayout)findViewById([email protected]
                                                                         .id.activity_chooser_view_content);
     mActivityChooserContentBackground = mActivityChooserContent.getBackground();
     mDefaultActivityButton            = (android.widget.FrameLayout)findViewById([email protected]
                                                                                  .id.default_activity_button);
     mDefaultActivityButton.setOnClickListener(mCallbacks);
     mDefaultActivityButton.setOnLongClickListener(mCallbacks);
     mDefaultActivityButtonImage = (android.widget.ImageView)mDefaultActivityButton.findViewById
                                       ([email protected]);
     mExpandActivityOverflowButton = (android.widget.FrameLayout)findViewById([email protected]
                                                                              .id.expand_activities_button);
     mExpandActivityOverflowButton.setOnClickListener(mCallbacks);
     mExpandActivityOverflowButtonImage = (android.widget.ImageView)mExpandActivityOverflowButton
                                          .findViewById([email protected]);
     mExpandActivityOverflowButtonImage.setImageDrawable(expandActivityOverflowButtonDrawable
                                                         );
     mAdapter = new android.widget.ActivityChooserView.ActivityChooserViewAdapter(this
                                                                                  );
     mAdapter.registerDataSetObserver(new _DataSetObserver_239(this));
     android.content.res.Resources resources = context.getResources();
     mListPopupMaxWidth = System.Math.Max(resources.getDisplayMetrics().widthPixels /
                                          2, resources.getDimensionPixelSize([email protected]_prefDialogWidth
                                                                             ));
 }
Example #8
0
        internal virtual void init(android.content.Context context, android.database.Cursor
                                   c, int flags)
        {
            if ((flags & FLAG_AUTO_REQUERY) == FLAG_AUTO_REQUERY)
            {
                flags       |= FLAG_REGISTER_CONTENT_OBSERVER;
                mAutoRequery = true;
            }
            else
            {
                mAutoRequery = false;
            }
            bool cursorPresent = c != null;

            mCursor      = c;
            mDataValid   = cursorPresent;
            mContext     = context;
            mRowIDColumn = cursorPresent ? c.getColumnIndexOrThrow("_id") : -1;
            if ((flags & FLAG_REGISTER_CONTENT_OBSERVER) == FLAG_REGISTER_CONTENT_OBSERVER)
            {
                mChangeObserver  = new android.widget.CursorAdapter.ChangeObserver(this);
                mDataSetObserver = new android.widget.CursorAdapter.MyDataSetObserver(this);
            }
            else
            {
                mChangeObserver  = null;
                mDataSetObserver = null;
            }
            if (cursorPresent)
            {
                if (mChangeObserver != null)
                {
                    c.registerContentObserver(mChangeObserver);
                }
                if (mDataSetObserver != null)
                {
                    c.registerDataSetObserver(mDataSetObserver);
                }
            }
        }
Example #9
0
        public override void setAdapter(android.widget.SpinnerAdapter adapter)
        {
            if (null != mAdapter)
            {
                mAdapter.unregisterDataSetObserver(mDataSetObserver);
                resetList();
            }
            mAdapter             = adapter;
            mOldSelectedPosition = android.widget.AdapterView.INVALID_POSITION;
            mOldSelectedRowId    = android.widget.AdapterView.INVALID_ROW_ID;
            if (mAdapter != null)
            {
                mOldItemCount = mItemCount;
                mItemCount    = mAdapter.getCount();
                checkFocus();
                mDataSetObserver = new android.widget.AdapterView <android.widget.SpinnerAdapter> .
                                   AdapterDataSetObserver(this);

                mAdapter.registerDataSetObserver(mDataSetObserver);
                int position = mItemCount > 0 ? 0 : android.widget.AdapterView.INVALID_POSITION;
                setSelectedPositionInt(position);
                setNextSelectedPositionInt(position);
                if (mItemCount == 0)
                {
                    // Nothing selected
                    checkSelectionChanged();
                }
            }
            else
            {
                checkFocus();
                resetList();
                // Nothing selected
                checkSelectionChanged();
            }
            requestLayout();
        }
Example #10
0
 public override void unregisterDataSetObserver(android.database.DataSetObserver observer
                                                )
 {
     throw new System.NotImplementedException();
 }
Example #11
0
		/// <summary>
		/// Sets the adapter that provides the data and the views to represent the data
		/// in this popup window.
		/// </summary>
		/// <remarks>
		/// Sets the adapter that provides the data and the views to represent the data
		/// in this popup window.
		/// </remarks>
		/// <param name="adapter">The adapter to use to create this window's content.</param>
		public virtual void setAdapter(android.widget.ListAdapter adapter)
		{
			if (mObserver == null)
			{
				mObserver = new android.widget.ListPopupWindow.PopupDataSetObserver(this);
			}
			else
			{
				if (mAdapter != null)
				{
					mAdapter.unregisterDataSetObserver(mObserver);
				}
			}
			mAdapter = adapter;
			if (mAdapter != null)
			{
				adapter.registerDataSetObserver(mObserver);
			}
			if (mDropDownList != null)
			{
				mDropDownList.setAdapter(mAdapter);
			}
		}
Example #12
0
 /// <summary>Create a new instance.</summary>
 /// <remarks>Create a new instance.</remarks>
 /// <param name="context">The application environment.</param>
 public ActivityChooserView(android.content.Context context) : this(context, null)
 {
     mModelDataSetOberver    = new _DataSetObserver_118(this);
     mOnGlobalLayoutListener = new _OnGlobalLayoutListener_132(this);
 }
Example #13
0
		/// <summary>Create a new instance.</summary>
		/// <remarks>Create a new instance.</remarks>
		/// <param name="context">The application environment.</param>
		/// <param name="attrs">A collection of attributes.</param>
		public ActivityChooserView(android.content.Context context, android.util.AttributeSet
			 attrs) : this(context, attrs, 0)
		{
			mModelDataSetOberver = new _DataSetObserver_118(this);
			mOnGlobalLayoutListener = new _OnGlobalLayoutListener_132(this);
		}
Example #14
0
 /// <summary>Create a new instance.</summary>
 /// <remarks>Create a new instance.</remarks>
 /// <param name="context">The application environment.</param>
 /// <param name="attrs">A collection of attributes.</param>
 public ActivityChooserView(android.content.Context context, android.util.AttributeSet
                            attrs) : this(context, attrs, 0)
 {
     mModelDataSetOberver    = new _DataSetObserver_118(this);
     mOnGlobalLayoutListener = new _OnGlobalLayoutListener_132(this);
 }
Example #15
0
		internal virtual void init(android.content.Context context, android.database.Cursor
			 c, int flags)
		{
			if ((flags & FLAG_AUTO_REQUERY) == FLAG_AUTO_REQUERY)
			{
				flags |= FLAG_REGISTER_CONTENT_OBSERVER;
				mAutoRequery = true;
			}
			else
			{
				mAutoRequery = false;
			}
			bool cursorPresent = c != null;
			mCursor = c;
			mDataValid = cursorPresent;
			mContext = context;
			mRowIDColumn = cursorPresent ? c.getColumnIndexOrThrow("_id") : -1;
			if ((flags & FLAG_REGISTER_CONTENT_OBSERVER) == FLAG_REGISTER_CONTENT_OBSERVER)
			{
				mChangeObserver = new android.widget.CursorAdapter.ChangeObserver(this);
				mDataSetObserver = new android.widget.CursorAdapter.MyDataSetObserver(this);
			}
			else
			{
				mChangeObserver = null;
				mDataSetObserver = null;
			}
			if (cursorPresent)
			{
				if (mChangeObserver != null)
				{
					c.registerContentObserver(mChangeObserver);
				}
				if (mDataSetObserver != null)
				{
					c.registerDataSetObserver(mDataSetObserver);
				}
			}
		}
Example #16
0
		/// <summary>Create a new instance.</summary>
		/// <remarks>Create a new instance.</remarks>
		/// <param name="context">The application environment.</param>
		public ActivityChooserView(android.content.Context context) : this(context, null)
		{
			mModelDataSetOberver = new _DataSetObserver_118(this);
			mOnGlobalLayoutListener = new _OnGlobalLayoutListener_132(this);
		}
 public virtual void unregisterDataSetObserver(android.database.DataSetObserver observer
                                               )
 {
     mDataSetObservable.unregisterObserver(observer);
 }
Example #18
0
		/// <summary>Create a new instance.</summary>
		/// <remarks>Create a new instance.</remarks>
		/// <param name="context">The application environment.</param>
		/// <param name="attrs">A collection of attributes.</param>
		/// <param name="defStyle">The default style to apply to this view.</param>
		public ActivityChooserView(android.content.Context context, android.util.AttributeSet
			 attrs, int defStyle) : base(context, attrs, defStyle)
		{
			mModelDataSetOberver = new _DataSetObserver_118(this);
			mOnGlobalLayoutListener = new _OnGlobalLayoutListener_132(this);
			android.content.res.TypedArray attributesArray = context.obtainStyledAttributes(attrs
				, [email protected], defStyle, 0);
			mInitialActivityCount = attributesArray.getInt([email protected]_initialActivityCount
				, android.widget.ActivityChooserView.ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_DEFAULT
				);
			android.graphics.drawable.Drawable expandActivityOverflowButtonDrawable = attributesArray
				.getDrawable([email protected]_expandActivityOverflowButtonDrawable
				);
			attributesArray.recycle();
			android.view.LayoutInflater inflater = android.view.LayoutInflater.from(mContext);
			inflater.inflate([email protected]_chooser_view, this, true);
			mCallbacks = new android.widget.ActivityChooserView.Callbacks(this);
			mActivityChooserContent = (android.widget.LinearLayout)findViewById([email protected]
				.id.activity_chooser_view_content);
			mActivityChooserContentBackground = mActivityChooserContent.getBackground();
			mDefaultActivityButton = (android.widget.FrameLayout)findViewById([email protected]
				.id.default_activity_button);
			mDefaultActivityButton.setOnClickListener(mCallbacks);
			mDefaultActivityButton.setOnLongClickListener(mCallbacks);
			mDefaultActivityButtonImage = (android.widget.ImageView)mDefaultActivityButton.findViewById
				([email protected]);
			mExpandActivityOverflowButton = (android.widget.FrameLayout)findViewById([email protected]
				.id.expand_activities_button);
			mExpandActivityOverflowButton.setOnClickListener(mCallbacks);
			mExpandActivityOverflowButtonImage = (android.widget.ImageView)mExpandActivityOverflowButton
				.findViewById([email protected]);
			mExpandActivityOverflowButtonImage.setImageDrawable(expandActivityOverflowButtonDrawable
				);
			mAdapter = new android.widget.ActivityChooserView.ActivityChooserViewAdapter(this
				);
			mAdapter.registerDataSetObserver(new _DataSetObserver_239(this));
			android.content.res.Resources resources = context.getResources();
			mListPopupMaxWidth = System.Math.Max(resources.getDisplayMetrics().widthPixels / 
				2, resources.getDimensionPixelSize([email protected]_prefDialogWidth
				));
		}
Example #19
0
 public virtual void registerDataSetObserver(android.database.DataSetObserver observer
                                             )
 {
     throw new System.NotImplementedException();
 }