Skip to content

Commit

Permalink
REF: RadioButtons spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
balakz committed Jul 19, 2021
1 parent 076699c commit c699dc6
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ class RadioButtonsElement<T>(
val radioGroup = RadioGroup(context)
for ((i, availableValue) in availableValues.withIndex()) {
val radioButton = AppCompatRadioButton(context)
val params = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
)
params.setMargins(
if (i == 0) {
0
} else {
40
}, 20, 0, 20
)
radioButton.layoutParams = params
radioButton.id = i
radioButton.text = availableValue.toString()
if (value == availableValue) {
Expand Down

0 comments on commit c699dc6

Please sign in to comment.