HorizontalPicker icon indicating copy to clipboard operation
HorizontalPicker copied to clipboard

itemMargin does not seem to work

Open eitanaviv opened this issue 7 years ago • 2 comments

Started using your library, but itemMargin does not work at all - via XML and via Code.

eitanaviv avatar Oct 28 '18 09:10 eitanaviv

Same here. I want to add some padding between my items, but it seems not to work properly. There is not spacing between elements.

Martinocom avatar May 07 '20 10:05 Martinocom

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) } } }

Martinocom avatar May 07 '20 11:05 Martinocom