BaseObservable
  public
  
  
  
  class
  BaseObservable
  
    extends Object
  
  
  
  
  
      implements
      
        Observable
      
  
  
| java.lang.Object | |
| ↳ | android.databinding.BaseObservable | 
| 
          
  
     | 
    
| 
          
  
      ObservableParcelable<T extends Parcelable>
     
    
   | 
    
A convenience class that implements Observable interface and provides
 notifyPropertyChanged(int) and notifyChange() methods.
Summary
Public constructors | |
|---|---|
      
      BaseObservable()
      
      
     | 
  |
Public methods | |
|---|---|
        
        
        
        
        
        void
     | 
  
    
      
      addOnPropertyChangedCallback(Observable.OnPropertyChangedCallback callback)
      
      
        Adds a callback to listen for changes to the Observable.  | 
  
        
        
        
        
        
        void
     | 
  
    
      
      notifyChange()
      
      
        Notifies listeners that all properties of this instance have changed.  | 
  
        
        
        
        
        
        void
     | 
  
    
      
      notifyPropertyChanged(int fieldId)
      
      
        Notifies listeners that a specific property has changed.  | 
  
        
        
        
        
        
        void
     | 
  
    
      
      removeOnPropertyChangedCallback(Observable.OnPropertyChangedCallback callback)
      
      
        Removes a callback from those listening for changes.  | 
  
Inherited methods | |
|---|---|
  
    
  
    java.lang.Object
  
 | |
  
    
  
    android.databinding.Observable
  
 | |
Public constructors
BaseObservable
BaseObservable ()
Public methods
addOnPropertyChangedCallback
void addOnPropertyChangedCallback (Observable.OnPropertyChangedCallback callback)
Adds a callback to listen for changes to the Observable.
| Parameters | |
|---|---|
callback | 
        
          Observable.OnPropertyChangedCallback: The callback to start listening.
 | 
      
notifyChange
void notifyChange ()
Notifies listeners that all properties of this instance have changed.
notifyPropertyChanged
void notifyPropertyChanged (int fieldId)
Notifies listeners that a specific property has changed. The getter for the property
 that changes should be marked with Bindable to generate a field in
 BR to be used as fieldId.
| Parameters | |
|---|---|
fieldId | 
        
          int: The generated BR id for the Bindable field.
 | 
      
removeOnPropertyChangedCallback
void removeOnPropertyChangedCallback (Observable.OnPropertyChangedCallback callback)
Removes a callback from those listening for changes.
| Parameters | |
|---|---|
callback | 
        
          Observable.OnPropertyChangedCallback: The callback that should stop listening.
 | 
      
Annotations
Interfaces
Classes
- BaseObservable
 - CallbackRegistry
 - CallbackRegistry.NotifierCallback
 - DataBindingUtil
 - ListChangeRegistry
 - MapChangeRegistry
 - MergedDataBinderMapper
 - Observable.OnPropertyChangedCallback
 - ObservableArrayList
 - ObservableArrayMap
 - ObservableBoolean
 - ObservableByte
 - ObservableChar
 - ObservableDouble
 - ObservableField
 - ObservableFloat
 - ObservableInt
 - ObservableList.OnListChangedCallback
 - ObservableLong
 - ObservableMap.OnMapChangedCallback
 - ObservableParcelable
 - ObservableShort
 - OnRebindCallback
 - PropertyChangeRegistry
 - ViewDataBinding
 - ViewStubProxy