Material Design Android Chip Drawable
2 min readMar 11, 2019
- Chip Drawable (Android Chip)
Type of Chip :-
- Input (Entry) Chip
- Input Chip checkable and show close icon by default.
<com.google.android.material.chip.Chip
style="@style/Widget.MaterialComponents.Chip.Entry"
android:id="@+id/entryChip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checkable="true"
android:textColor="@color/white"
app:checkedIcon="@drawable/ic_airplane"
app:chipBackgroundColor="@color/colorPrimary"
app:chipIconTint="@color/white" />
2. Choice chip
- Choice chip show multiple option(Choice). User can select any one.
<com.google.android.material.chip.Chip
style="@style/Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:checkable="true"
android:textColor="@color/white"
app:chipIconTint="@color/white" />
3.Filter chip
- Filter Chip is checkable and shows a check mark when checked and Used for multi choice.
<com.google.android.material.chip.Chip
style="@style/Widget.MaterialComponents.Chip.Filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checkable="true"
android:textColor="@color/white"
app:chipIconTint="@color/white" />
4.Action Chip
Action Chip is checkble and it trigger action when clicked.
<com.google.android.material.chip.Chip
style="@style/Widget.MaterialComponents.Chip.Action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checkable="true"
android:textColor="@color/white"
app:checkedIcon="@drawable/ic_account"
app:chipIconTint="@color/white" />
Dependencies need to added in build.gradle file.
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'com.google.android.material:material:1.1.0-alpha04'
for more information
GitHub Project :
https://github.com/milanrupapara/Material-Design_Chip-Drawable