Exemplo n.º 1
0
 /**
  * Sets whether the attribute is dirty and also notifies the editor some part's dirty flag as
  * changed.
  *
  * <p>Subclasses should set the to true as a result of user interaction with the widgets in the
  * section and then should set to false when the commit() method completed.
  *
  * @param isDirty the new value to set the dirty-flag to
  */
 public void setDirty(boolean isDirty) {
   boolean wasDirty = mIsDirty;
   mIsDirty = isDirty;
   // TODO: for unknown attributes, getParent() != null && getParent().getEditor() != null
   if (wasDirty != isDirty) {
     AndroidXmlEditor editor = getUiParent().getEditor();
     if (editor != null) {
       editor.editorDirtyStateChanged();
     }
   }
 }