Skip to content

Instantly share code, notes, and snippets.

@amirul12
Created December 26, 2019 10:49
Show Gist options
  • Save amirul12/f73d84aa92d0816ae741e5f56f0a8c4c to your computer and use it in GitHub Desktop.
Save amirul12/f73d84aa92d0816ae741e5f56f0a8c4c to your computer and use it in GitHub Desktop.
<com.google.android.material.chip.ChipGroup
android:id="@+id/group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:chipSpacing="10dp"
app:singleSelection="true">
<com.google.android.material.chip.Chip
android:id="@+id/cCasual"
style="@style/Colors_Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Casual Leave"
android:theme="@style/Theme.MaterialComponents.Light" />
<com.google.android.material.chip.Chip
android:id="@+id/cSick"
style="@style/Colors_Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sick Leave"
android:theme="@style/Theme.MaterialComponents.Light" />
<com.google.android.material.chip.Chip
android:id="@+id/cEarn"
style="@style/Colors_Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Earn Leave"
android:theme="@style/Theme.MaterialComponents.Light" />
<com.google.android.material.chip.Chip
android:id="@+id/option_1"
style="@style/Colors_Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Option 1"
android:theme="@style/Theme.MaterialComponents.Light" />
<com.google.android.material.chip.Chip
android:id="@+id/option_2"
style="@style/Colors_Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checkable="true"
android:clickable="true"
android:focusable="true"
android:text="Option 2"
android:theme="@style/Theme.MaterialComponents.Light"
app:chipBackgroundColor="@color/chip_shape" />
</com.google.android.material.chip.ChipGroup>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment