开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜