Reputation: 41
Is there a way to change chip text vertical padding? I dig into the api and it looks like we can only change startPadding and endPadding using :
app:chipStartPadding
app:chipEndPadding
app:textStartPadding
app:textEndPadding
so how can we do things like changing chipTopPadding or textTopPadding?
Upvotes: 3
Views: 1676
Reputation: 363657
You can only reduce the height of the Chip
using the chipMinHeight
attribute:
<com.google.android.material.chip.Chip
app:chipMinHeight="24dp"
.../>
The layout_height
parameter is not enough since the minHeight is based on chipMinHeight
.
Here the difference with a standard Chip
:
Also if you want to reduce the touch target size using the chipMinTouchTargetSize
attribute:
<com.google.android.material.chip.Chip
app:chipMinHeight="24dp"
app:chipMinTouchTargetSize="24dp"
Here you can check the difference in design mode:
Upvotes: 7