@@ -28,6 +28,7 @@ class SSCustomEdittextOutlinedBorder @JvmOverloads constructor(context: Context,
2828 private var titleErrorColor = ContextCompat .getColor(context, R .color.color_error)
2929 private var borderColor = ContextCompat .getColor(context, R .color.color_warm_grey)
3030 private var borderErrorColor = ContextCompat .getColor(context, R .color.color_error)
31+ private var borderWidth = 1
3132
3233 val getTextValue: String
3334 get() {
@@ -54,6 +55,7 @@ class SSCustomEdittextOutlinedBorder @JvmOverloads constructor(context: Context,
5455 titleErrorColor = typedArray.getColor(R .styleable.custom_component_attributes_custom_component_title_error_color, ContextCompat .getColor(context, R .color.color_error))
5556 borderColor = typedArray.getColor(R .styleable.custom_component_attributes_custom_component_border_color, ContextCompat .getColor(context, R .color.color_warm_grey))
5657 borderErrorColor = typedArray.getColor(R .styleable.custom_component_attributes_custom_component_border_error_color, ContextCompat .getColor(context, R .color.color_error))
58+ borderWidth = typedArray.getInt(R .styleable.custom_component_attributes_custom_component_border_width, 1 )
5759
5860 setTitle(title as String )
5961 setEditTextHint(editTextHint as String )
@@ -130,12 +132,12 @@ class SSCustomEdittextOutlinedBorder @JvmOverloads constructor(context: Context,
130132 val dcs = drawable.constantState as DrawableContainerState ?
131133 val drawableItems = dcs!! .children
132134 val gradientDrawableChecked = drawableItems[0 ] as GradientDrawable
133- gradientDrawableChecked.setStroke(2 , colorID)
135+ gradientDrawableChecked.setStroke(borderWidth , colorID)
134136 }
135137
136138 private fun setTextStyle (textStyle : Typeface ? ) {
137139 lableTitle.typeface = textStyle
138140 editText.typeface = textStyle
139141 lableError.typeface = textStyle
140142 }
141- }
143+ }
0 commit comments