How to clone a performance?

My question is almost in this question:

Clone a text view to add it to a ViewGroup

However, I inflated the view and then tried to clone it at the object level for performance reasons (I don't want to parse XML every time), so the answer does not help me. View.clone () is protected and does not seem to have a copy constructor. Is there any way to do this?

+61
android clone copy view
Nov 11 '10 at 20:59
source share
1 answer

You cannot clone submissions, the way to do this is to inflate your view every time. Note that XML is compiled into a binary file that can be parsed very efficiently.

+98
Nov 11 '10 at 21:04
source share



All Articles