SelfContentObserver
protected open class SelfContentObserver : ContentObserver
Cursors use this class to track changes others make to their URI.
Summary
Inherited functions |
From class ContentObserver
Unit |
dispatchChange(selfChange: Boolean)
Dispatches a change notification to the observer.
If a Handler was supplied to the ContentObserver constructor, then a call to the #onChange method is posted to the handler's message queue. Otherwise, the #onChange method is invoked immediately on this thread.
|
Unit |
dispatchChange(selfChange: Boolean, uri: Uri?)
Dispatches a change notification to the observer. Includes the changed content Uri when available.
If a Handler was supplied to the ContentObserver constructor, then a call to the #onChange method is posted to the handler's message queue. Otherwise, the #onChange method is invoked immediately on this thread.
|
Unit |
dispatchChange(selfChange: Boolean, uri: Uri?, flags: Int)
Dispatches a change notification to the observer. Includes the changed content Uri when available.
If a Handler was supplied to the ContentObserver constructor, then a call to the #onChange method is posted to the handler's message queue. Otherwise, the #onChange method is invoked immediately on this thread.
|
Unit |
dispatchChange(selfChange: Boolean, uris: MutableCollection<Uri!>, flags: Int)
Dispatches a change notification to the observer. Includes the changed content Uris when available.
If a Handler was supplied to the ContentObserver constructor, then a call to the #onChange method is posted to the handler's message queue. Otherwise, the #onChange method is invoked immediately on this thread.
|
Unit |
onChange(selfChange: Boolean, uri: Uri?)
This method is called when a content change occurs. Includes the changed content Uri when available.
Subclasses should override this method to handle content changes. To ensure correct operation on older versions of the framework that did not provide richer arguments, applications should implement all overloads.
Example implementation:
<code>
// Implement the onChange(boolean) method to delegate the change notification to
// the onChange(boolean, Uri) method to ensure correct operation on older versions
// of the framework that did not have the onChange(boolean, Uri) method.
@Override
public void onChange(boolean selfChange) {
onChange(selfChange, null);
}
// Implement the onChange(boolean, Uri) method to take advantage of the new Uri argument.
@Override
public void onChange(boolean selfChange, Uri uri) {
// Handle change.
}
</code>
|
Unit |
onChange(selfChange: Boolean, uri: Uri?, flags: Int)
This method is called when a content change occurs. Includes the changed content Uri when available.
Subclasses should override this method to handle content changes. To ensure correct operation on older versions of the framework that did not provide richer arguments, applications should implement all overloads.
|
Unit |
onChange(selfChange: Boolean, uris: MutableCollection<Uri!>, flags: Int)
This method is called when a content change occurs. Includes the changed content Uris when available.
Subclasses should override this method to handle content changes. To ensure correct operation on older versions of the framework that did not provide richer arguments, applications should implement all overloads.
|
|
Public constructors
Public methods
deliverSelfNotifications
open fun deliverSelfNotifications(): Boolean
Return |
Boolean |
True if self-change notifications should be delivered to the observer. |
onChange
open fun onChange(selfChange: Boolean): Unit
Parameters |
selfChange |
Boolean: True if this is a self-change notification. |