次の方法で共有


Observable.NotifyObservers Method

Definition

Overloads

NotifyObservers()

If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.

NotifyObservers(Object)

If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.

NotifyObservers()

If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.

[Android.Runtime.Register("notifyObservers", "()V", "GetNotifyObserversHandler")]
public virtual void NotifyObservers ();
[<Android.Runtime.Register("notifyObservers", "()V", "GetNotifyObserversHandler")>]
abstract member NotifyObservers : unit -> unit
override this.NotifyObservers : unit -> unit
Attributes

Remarks

If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.

Each observer has its update method called with two arguments: this observable object and null. In other words, this method is equivalent to: <blockquote>notifyObservers(null)</blockquote>

Java documentation for java.util.Observable.notifyObservers().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

NotifyObservers(Object)

If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.

[Android.Runtime.Register("notifyObservers", "(Ljava/lang/Object;)V", "GetNotifyObservers_Ljava_lang_Object_Handler")]
public virtual void NotifyObservers (Java.Lang.Object? arg);
[<Android.Runtime.Register("notifyObservers", "(Ljava/lang/Object;)V", "GetNotifyObservers_Ljava_lang_Object_Handler")>]
abstract member NotifyObservers : Java.Lang.Object -> unit
override this.NotifyObservers : Java.Lang.Object -> unit

Parameters

arg
Object

any object.

Attributes

Remarks

If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.

Each observer has its update method called with two arguments: this observable object and the arg argument.

Java documentation for java.util.Observable.notifyObservers(java.lang.Object).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to