HorizontalPicker
HorizontalPicker copied to clipboard
itemMargin does not seem to work
Started using your library, but itemMargin does not work at all - via XML and via Code.
Same here. I want to add some padding between my items, but it seems not to work properly. There is not spacing between elements.
I found a quick solution for this problem. This lines worked for me (in Kotlin):
myHorizontalPicker.children.forEach { if (it is TextView) { val params: LinearLayout.LayoutParams = LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT) params.setMargins(15, 0, 15, 0) it.setLayoutParams(params) it.setPadding(40, 15, 40, 15) } } }