【发布时间】:2018-11-22 05:09:41
【问题描述】:
如何在 kotlin 中更改 textview 的边距和内边距?我试过这个:
val maskot_names = maskot_row.findViewById<TextView>(R.id.maskot_name)
maskot_names.text=maskot_names_list.get(position)
// showing "???" if maskot_names is empty
if(maskot_names.text=="")
{
maskot_names.text="???"
maskot_names.paddingTop(16f)
}
【问题讨论】:
-
I've tried this:结果如何?
标签: android kotlin textview margin padding