How to make space between LinearLayout children?

后端 未结 13 560
一整个雨季
一整个雨季 2020-11-30 23:46

I am programatically adding custom views to a vertical LinearLayout, and I would like there to be some space between the views. I have tried adding: setPadding(0, 1, 0, 1)

13条回答
  •  一整个雨季
    2020-12-01 00:25

    If your layout contain labels o some container for text. You can add at the end of each text "\n" to split a line and make space between elements.
    Example:

    video?.text="Video NR1: ${obj.Titulo} \n" 
    

提交回复
热议问题