I'm developing an app with chips.
I have a constraint layout with a TextView and a ChipGroup. The chips are added programmatically.
This is the layout
...
<com.google.android.material.chip.ChipGroup
android:id="@+id/chipGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="@android:color/holo_red_dark"
android:gravity="end"
app:layout_constraintBottom_toTopOf="@+id/chartView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/textView"
app:layout_constraintTop_toBottomOf="@+id/project3">
</com.google.android.material.chip.ChipGroup>
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="Pippo"
android:textColor="@color/greenPositive"
app:layout_constraintBottom_toTopOf="@+id/chartView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/project3" />
...
The activity appears as the screenshot (I have put a red background in the chipgroup to show the area)

How to solve all these problems?
Adding app:chipSpacingVertical attribute to ChipGroup View will solve this.
<com.google.android.material.chip.ChipGroup
android:id="@+id/chipGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:chipSpacingVertical="4dp"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With