Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
  
  
    
    
  
  
Group
  public
  
  
  
  class
  Group
  
  
  
  
    extends View
  
  
  
  
  
  
  
    
    | java.lang.Object | 
  
  
    
      | ↳ | View | 
  
  
    
      |  | ↳ | android.support.constraint.Group | 
  
  
    
  Added in 1.1
 
     This class controls the visibility of a set of referenced widgets.
     Widgets are referenced by being added to a comma separated list of ids, e.g:
     
     <android.support.constraint.Group
              android:id="@+id/group"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:visibility="visible"
              app:constraint_referenced_ids="button4,button9" />
     
     
     
         The visibility of the group will be applied to the referenced widgets.
         It's a convenient way to easily hide/show a set of widgets without having to maintain this set
         programmatically.
     
     
Multiple groups
     
         Multiple groups can reference the same widgets -- in that case, the XML declaration order will
         define the final visibility state (the group declared last will have the last word).
 
Summary
| Public constructors | 
|---|
  
  
  
    | 
      Group(Context context)
       | 
  
  
  
  
    | 
      Group(Context context, AttributeSet attrs)
       | 
  
  
  
  
    | 
      Group(Context context, AttributeSet attrs, int defStyleAttr)
       | 
  
| Inherited methods | 
|---|
| 
    From class
      
        
          java.lang.Object
        
      
      
  
  
  
    | 
        
        
        
        
        
        Object | 
      clone()
       |  
  
  
    | 
        
        
        
        
        
        boolean | 
      equals(Object arg0)
       |  
  
  
    | 
        
        
        
        
        
        void | 
      finalize()
       |  
  
  
    | 
        
        
        
        final
        
        Class<?> | 
      getClass()
       |  
  
  
    | 
        
        
        
        
        
        int | 
      hashCode()
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      notify()
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      notifyAll()
       |  
  
  
    | 
        
        
        
        
        
        String | 
      toString()
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      wait(long arg0, int arg1)
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      wait(long arg0)
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      wait()
       |  | 
Public constructors
    Group
    
public Group (Context context)
    
    
    
  
    
    | Parameters | 
|---|
      
        | context | Context | 
    
 
    Group
    
public Group (Context context, 
                AttributeSet attrs)
    
    
    
  
    
    | Parameters | 
|---|
      
        | context | Context | 
      
        | attrs | AttributeSet | 
    
 
    Group
    
public Group (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)
    
    
    
  
    
    | Parameters | 
|---|
      
        | context | Context | 
      
        | attrs | AttributeSet | 
      
        | defStyleAttr | int | 
    
 
Public methods
    getReferencedIds
    
public int[] getReferencedIds ()
    
    
    
  Helpers typically reference a collection of ids
    
      | Returns | 
|---|
      
        | int[] | ids referenced | 
    
 
    
    
public void loadParameters (ConstraintSet.Constraint constraint, 
                HelperWidget child, 
                ConstraintLayout.LayoutParams layoutParams, 
                 mapIdToWidget)
    
    
    
  
    
    | Parameters | 
|---|
      
        | constraint | ConstraintSet.Constraint | 
      
        | child | HelperWidget | 
      
        | layoutParams | ConstraintLayout.LayoutParams | 
      
        | mapIdToWidget |  | 
    
 
    
    
public void resolveRtl (ConstraintWidget widget, 
                boolean isRtl)
    
    
    
  
    
    | Parameters | 
|---|
      
        | widget | ConstraintWidget | 
      
        | isRtl | boolean | 
    
 
    setReferencedIds
    
public void setReferencedIds (int[] ids)
    
    
    
  Helpers typically reference a collection of ids
    
    
      | Returns | 
|---|
      
        | void | ids referenced | 
    
 
    updatePostConstraints
    
public void updatePostConstraints (ConstraintLayout constainer)
    
    
    
  
    
    | Parameters | 
|---|
      
        | constainer | ConstraintLayout | 
    
 
    
    
public void updatePreLayout (ConstraintWidgetContainer container, 
                Helper helper, 
                 map)
    
    
    
  
    
    | Parameters | 
|---|
      
        | container | ConstraintWidgetContainer | 
      
        | helper | Helper | 
      
        | map |  | 
    
 
Protected methods
    getViews
    
protected View[] getViews (ConstraintLayout layout)
    
    
    
  
    
    | Parameters | 
|---|
      
        | layout | ConstraintLayout | 
    
    
 
 
 
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2025-02-10 UTC.
  
  
  
    
      [null,null,["Last updated 2025-02-10 UTC."],[],[]]