示例#1
0
 protected internal override void onAttachedToWindow()
 {
     base.onAttachedToWindow();
     android.widget.ActivityChooserModel dataModel = mAdapter.getDataModel();
     if (dataModel != null)
     {
         dataModel.registerObserver(mModelDataSetOberver);
     }
     mIsAttachedToWindow = true;
 }
示例#2
0
 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();
 }