Code example for CompoundButton

Methods: getId

0
      if (mCheckedId != -1) {
        setCheckedStateForView(mCheckedId, false);
      } 
      mProtectFromCheckedChange = false;
 
      final int id = buttonView.getId();
      setCheckedId(id);
    } 
  } 
 
  /** 
   * <p> 
   * A pass-through listener acts upon the events and dispatches them to another 
   * listener. This allows the table layout to set its own internal hierarchy 
   * change listener without preventing the user to setup his. 
   * </p> 
   */ 
  private class PassThroughHierarchyChangeListener implements 
      ViewGroup.OnHierarchyChangeListener {
    /** Hierarchy change listener. */ 
    private ViewGroup.OnHierarchyChangeListener mOnHierarchyChangeListener;