Reputation: 3255
I am using a simple chipView
. There is a little problem, the default shape for chip is oval. I want to make it rectangle and add a little radius to corners? How can I achieve this?
Upvotes: 3
Views: 1253
Reputation: 363865
You can do it in 2 ways.
The fastest way is the use of app:chipCornerRadius
attribute in the layout.
The 2nd way allows you to draw different kind of shapes using the app:shapeAppearanceOverlay
attribute:
<com.google.android.material.chip.Chip
app:shapeAppearanceOverlay="@style/buttomShape0"
../>
with:
<style name="buttomShape0">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">0dp</item>
</style>
Upvotes: 3