setFieldUnderlineColors

@RequiresApi(value = 27)
fun setFieldUnderlineColors(defaultColorHex: String, focusColorHex: String)

XML Attributes: fieldUnderlineColor, focusedFieldUnderlineColor


By default, the edit text fields will use the styling defined by the app theme. However, the colors for the edit text field's underline can be customized programmatically by calling this method.

Important:

This method requires API level 27 or higher

Parameters

defaultColorHex

The color (in Hex format) for the underline when fields do not have focus

focusColorHex

The color (in Hex format) for the underline when fields have focus


fun setFieldUnderlineColors(defaultColor: Int, focusColor: Int)

XML Attributes: fieldUnderlineColor, focusedFieldUnderlineColor

When specifying XML attributes, it is recommended to provide both. If only one is provided there may be some scenarios where the view is unable to set the underline color.


By default, the edit text fields will use the styling defined by the app theme. However, the colors for the edit text field's underline can be customized programmatically by calling this method.

Parameters

defaultColor

The color for the underline when fields do not have focus

focusColor

The color for the underline when fields have focus