Simple MultiLine Radio Group
Add it to your build.gradle with:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
and:
dependencies {
implementation 'com.github.JabirDev:MultiLineRadioGroup:{latest version}'
}
<com.jabirdev.multilineradiogroup.MultiLineRadioGroup
android:id="@+id/my_radio_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:overScrollMode="never"
android:scrollbars="none"
app:addList="@array/radio_buttons"
app:layout_constraintTop_toBottomOf="@+id/text"/>
<string-array name="radio_buttons">
<item>Mantap</item>
<item>Jiwa</item>
<item>Keren</item>
<item>Uy</item>
<item>Wow</item>
<item>Yuhu</item>
<item>Yey</item>
<item>Net Not</item>
<item>Wkwk</item>
<item>Top</item>
</string-array>
binding.myRadioGroup.setOnChoseListener = MultiLineRadioGroup.OnChoseListener {position, text ->
binding.text.text = "Selected: $position $text"
}