Reputation: 907
I have a lot of views(TextView, View etc...) in my android app and I have two choices.(as you can see in title)
My question is -
Which one takes few resources and time when executed: add view programmatically or add view in a layout xml file manually?
Upvotes: 0
Views: 284
Reputation: 9617
Adding views programatically is faster. When adding views from layout XML, it adds them in the same way but in addition, it needs to walk through that XML and use a lot of reflexion.
Upvotes: 1