Android: Cloning class instance
I have to build an array of MyView instances (extends WebView). The only difference of each view is the content. So instead of recreating this each time I would like to create one MyView all other instances would be开发者_运维问答 clones of this one.
Is there a way for doing something like that in this case on Android? Please post a code sample for it. Thx!
You question is a bit vague. You cannot create clones of views according to understanding. You can use the same xml layout. Or you can update the underlying data of a view and make the view to invalidate so it will be redrawn.
精彩评论