# Group

Summary:[Ctors](https://developer.android.com/reference/android/support/constraint/Group#pubctors)\|[Methods](https://developer.android.com/reference/android/support/constraint/Group#pubmethods)\|[Protected Methods](https://developer.android.com/reference/android/support/constraint/Group#promethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/constraint/Group#inhmethods)  

# Group

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The Constraint Layout support library has been superseded by the[AndroidX Constraint Layout library](https://developer.android.com/reference/androidx/constraintlayout/classes), which is part of[Jetpack](https://developer.android.com/jetpack). The`Group`class has been superseded by[`androidx.constraintlayout.widget.Group`](https://developer.android.com/reference/androidx/constraintlayout/widget/Group). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX.

`
public


class
Group
`  
`


``

extends View


``


`

|---|---|----------------------------------|
| java.lang.Object                       |||
| ↳ | View                                ||
|   | ↳ | android.support.constraint.Group |

<br />

*** ** * ** ***

**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.

<br />

## 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).

<br />

## Summary

|                                                                                 ### Public constructors                                                                                 ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Group](https://developer.android.com/reference/android/support/constraint/Group#Group(Context))`(Context context) `                                                              |
| ` `[Group](https://developer.android.com/reference/android/support/constraint/Group#Group(Context,%20AttributeSet))`(Context context, AttributeSet attrs) `                          |
| ` `[Group](https://developer.android.com/reference/android/support/constraint/Group#Group(Context,%20AttributeSet,%20int))`(Context context, AttributeSet attrs, int defStyleAttr) ` |

|                                                                                                                                                                                                                                                                                       ### Public methods                                                                                                                                                                                                                                                                                       ||
|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int[]` | ` `[getReferencedIds](https://developer.android.com/reference/android/support/constraint/Group#getReferencedIds())`() ` Helpers typically reference a collection of ids                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` void`  | ` `[loadParameters](https://developer.android.com/reference/android/support/constraint/Group#loadParameters(android.support.constraint.ConstraintSet.Constraint,%20HelperWidget,%20android.support.constraint.ConstraintLayout.LayoutParams,%20<any>))`(`[ConstraintSet.Constraint](https://developer.android.com/reference/android/support/constraint/ConstraintSet.Constraint)` constraint, HelperWidget child, `[ConstraintLayout.LayoutParams](https://developer.android.com/reference/android/support/constraint/ConstraintLayout.LayoutParams)` layoutParams, ` mapIdToWidget) |
| ` void`  | ` `[resolveRtl](https://developer.android.com/reference/android/support/constraint/Group#resolveRtl(ConstraintWidget,%20boolean))`(ConstraintWidget widget, boolean isRtl) `                                                                                                                                                                                                                                                                                                                                                                                                         |
| ` void`  | ` `[setReferencedIds](https://developer.android.com/reference/android/support/constraint/Group#setReferencedIds(int[]))`(int[] ids) ` Helpers typically reference a collection of ids                                                                                                                                                                                                                                                                                                                                                                                                |
| ` void`  | ` `[updatePostConstraints](https://developer.android.com/reference/android/support/constraint/Group#updatePostConstraints(android.support.constraint.ConstraintLayout))`(`[ConstraintLayout](https://developer.android.com/reference/android/support/constraint/ConstraintLayout)` constainer) `                                                                                                                                                                                                                                                                                     |
| ` void`  | ` `[updatePreLayout](https://developer.android.com/reference/android/support/constraint/Group#updatePreLayout(ConstraintWidgetContainer,%20Helper,%20<any>))`(ConstraintWidgetContainer container, Helper helper, ` map)                                                                                                                                                                                                                                                                                                                                                             |

|                                                                                                                             ### Protected methods                                                                                                                             ||
|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` View[]` | ` `[getViews](https://developer.android.com/reference/android/support/constraint/Group#getViews(android.support.constraint.ConstraintLayout))`(`[ConstraintLayout](https://developer.android.com/reference/android/support/constraint/ConstraintLayout)` layout) ` |

| ### 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)
```

<br />

<br />

|         Parameters          ||
|-----------|------------------|
| `context` | `Context` <br /> |

### Group

```
public Group (Context context, 
                AttributeSet attrs)
```

<br />

<br />

|            Parameters            ||
|-----------|-----------------------|
| `context` | `Context` <br />      |
| `attrs`   | `AttributeSet` <br /> |

### Group

```
public Group (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)
```

<br />

<br />

|              Parameters               ||
|----------------|-----------------------|
| `context`      | `Context` <br />      |
| `attrs`        | `AttributeSet` <br /> |
| `defStyleAttr` | `int` <br />          |

## Public methods

### getReferencedIds

```
public int[] getReferencedIds ()
```

Helpers typically reference a collection of ids

<br />

|            Returns             ||
|---------|-----------------------|
| `int[]` | ids referenced <br /> |

### loadParameters

```
public void loadParameters (ConstraintSet.Constraint constraint, 
                HelperWidget child, 
                ConstraintLayout.LayoutParams layoutParams, 
                 mapIdToWidget)
```

<br />

<br />

|                       Parameters                        ||
|-----------------|----------------------------------------|
| `constraint`    | `ConstraintSet.Constraint` <br />      |
| `child`         | `HelperWidget` <br />                  |
| `layoutParams`  | `ConstraintLayout.LayoutParams` <br /> |
| `mapIdToWidget` | <br />                                 |

### resolveRtl

```
public void resolveRtl (ConstraintWidget widget, 
                boolean isRtl)
```

<br />

<br />

|             Parameters              ||
|----------|---------------------------|
| `widget` | `ConstraintWidget` <br /> |
| `isRtl`  | `boolean` <br />          |

### setReferencedIds

```
public void setReferencedIds (int[] ids)
```

Helpers typically reference a collection of ids

<br />

|     Parameters      ||
|-------|--------------|
| `ids` | `int` <br /> |

|            Returns            ||
|--------|-----------------------|
| `void` | ids referenced <br /> |

### updatePostConstraints

```
public void updatePostConstraints (ConstraintLayout constainer)
```

<br />

<br />

|               Parameters                ||
|--------------|---------------------------|
| `constainer` | `ConstraintLayout` <br /> |

### updatePreLayout

```
public void updatePreLayout (ConstraintWidgetContainer container, 
                Helper helper, 
                 map)
```

<br />

<br />

|                   Parameters                    ||
|-------------|------------------------------------|
| `container` | `ConstraintWidgetContainer` <br /> |
| `helper`    | `Helper` <br />                    |
| `map`       | <br />                             |

## Protected methods

### getViews

```
protected View[] getViews (ConstraintLayout layout)
```

<br />

<br />

|             Parameters              ||
|----------|---------------------------|
| `layout` | `ConstraintLayout` <br /> |

|     Returns      ||
|----------|--------|
| `View[]` | <br /> |