use this property to change chip icon position:
android:layoutDirection="rtl"
You could set android:layoutDirection="rtl"
or the opposite of your current direction to put the icon on the right.
For more: https://material.io/design/usability/bidirectionality.html
Start icon
app:chipIconVisible
— visibility of the chip icon. app:chipIcon
— drawable icon to show at the start of the chip. app:chipIconSize
— size of the chip icon.
chip.setOnClickListener {
// Handle chip click
}
close icon
app:closeIconVisible
— visibility of the close icon. app:closeIcon
— drawable icon show at end of the chip. app:closeIconSize
— size of the close icon.
chip.setOnCloseIconClickListener {
// Handle chip close icon click
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.