How do I clone a View?
AndroidViewCopyCloneAndroid Problem Overview
My question is almost exactly this question:
https://stackoverflow.com/questions/3900044/clone-textview-to-append-it-to-a-viewgroup
However, I was inflating a view, and then attempting to clone it at the object level for performance reasons (I don't want to parse XML every single time), so that answer doesn't help me. View.clone() is protected and it apparently doesn't have a copy constructor. Is there any way to do this?
Android Solutions
Solution 1 - Android
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.