diff --git a/formbuilderlibrary/src/main/java/cz/qase/android/formbuilderlibrary/element/RadioButtonsElement.kt b/formbuilderlibrary/src/main/java/cz/qase/android/formbuilderlibrary/element/RadioButtonsElement.kt index 1b63ec6..a7a098a 100644 --- a/formbuilderlibrary/src/main/java/cz/qase/android/formbuilderlibrary/element/RadioButtonsElement.kt +++ b/formbuilderlibrary/src/main/java/cz/qase/android/formbuilderlibrary/element/RadioButtonsElement.kt @@ -45,6 +45,18 @@ class RadioButtonsElement( 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) {