@@ -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 )
@@ -123,12 +125,12 @@ class SSCustomEdittextOutlinedBorder @JvmOverloads constructor(context: Context,
123125 val dcs = drawable.constantState as DrawableContainerState ?
124126 val drawableItems = dcs!! .children
125127 val gradientDrawableChecked = drawableItems[0 ] as GradientDrawable
126- gradientDrawableChecked.setStroke(2 , colorID)
128+ gradientDrawableChecked.setStroke(borderWidth , colorID)
127129 }
128130
129131 private fun setTextStyle (textStyle : Typeface ? ) {
130132 lableTitle.typeface = textStyle
131133 editText.typeface = textStyle
132134 lableError.typeface = textStyle
133135 }
134- }
136+ }
0 commit comments