Skip to content

Commit

Permalink
sonar lint issue solve
Browse files Browse the repository at this point in the history
  • Loading branch information
MalaRuparel2023 committed May 23, 2024
1 parent 7d3195c commit fbe2d40
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ class SingleSelectionMultiLineRadioButton @JvmOverloads constructor(context: Con
}
override fun initAttributes(attrs: AttributeSet?) {
val typedArray = context.theme.obtainStyledAttributes(attrs, R.styleable.MultiLineRadioGroup, 0, 0)
with(typedArray) {

try {
setColumnCount(getInt(R.styleable.MultiLineRadioGroup_rg_ml_spancount,DEFAULT_SPAN_COUNT))
setSpace(getInt(R.styleable.MultiLineRadioGroup_rg_ml_spacing, DEFAULT_SPACING))
setEdge(getBoolean(R.styleable.MultiLineRadioGroup_rg_ml_includeedge, false))
setColumnCount(typedArray.getInt(R.styleable.MultiLineRadioGroup_rg_ml_spancount,DEFAULT_SPAN_COUNT))
setSpace(typedArray.getInt(R.styleable.MultiLineRadioGroup_rg_ml_spacing, DEFAULT_SPACING))
setEdge(typedArray.getBoolean(R.styleable.MultiLineRadioGroup_rg_ml_includeedge, false))

viewTextSelector =getColorStateList(R.styleable.MultiLineRadioGroup_rg_ml_text_selector) ?: setDefaultTextColor()
viewBgSelector = getDrawable(R.styleable.MultiLineRadioGroup_rg_ml_background) ?: setDefaultDrawable()
viewTextSelector =typedArray.getColorStateList(R.styleable.MultiLineRadioGroup_rg_ml_text_selector) ?: setDefaultTextColor()
viewBgSelector = typedArray.getDrawable(R.styleable.MultiLineRadioGroup_rg_ml_background) ?: setDefaultDrawable()

dataFromXml = getResourceId(R.styleable.MultiLineRadioGroup_rg_ml_list_item, 0)
dataFromXml = typedArray.getResourceId(R.styleable.MultiLineRadioGroup_rg_ml_list_item, 0)

} finally {
typedArray.recycle()
}
}


}
@SuppressLint("NotifyDataSetChanged")
Expand Down

0 comments on commit fbe2d40

Please sign in to comment.