protected internal override void onAttachedToWindow() { base.onAttachedToWindow(); android.widget.ActivityChooserModel dataModel = mAdapter.getDataModel(); if (dataModel != null) { dataModel.registerObserver(mModelDataSetOberver); } mIsAttachedToWindow = true; }
public virtual void setDataModel(android.widget.ActivityChooserModel dataModel) { android.widget.ActivityChooserModel oldDataModel = this._enclosing.mAdapter.getDataModel (); if (oldDataModel != null && this._enclosing.isShown()) { oldDataModel.unregisterObserver(this._enclosing.mModelDataSetOberver); } this.mDataModel = dataModel; if (dataModel != null && this._enclosing.isShown()) { dataModel.registerObserver(this._enclosing.mModelDataSetOberver); } this.notifyDataSetChanged(); }