How do I clone a View?

前端 未结 1 1593
情歌与酒
情歌与酒 2020-11-27 19:44

My question is almost exactly this question:

Clone textview to append it to a ViewGroup

However, I was inflating a view, and then attempting to clone it at t

相关标签:
1条回答
  • 2020-11-27 20:36

    You cannot clone views, the way to do it is to inflate your View every time. Note that the XML is compiled into binary which can be parsed very efficiently.

    0 讨论(0)
提交回复
热议问题