Reputation: 7794
Is it faster to define a Vie
w in a xml layout file and use it via LayoutInflater
in the application or is it faster to define it within the program? I understand that it is "cleaner" to define the View
via xml yet here I am just interested in the performance aspect. (I am writing an adapter which uses heaps of views of a very simple type)
Upvotes: 1
Views: 425
Reputation: 157
it depends on your need if you do it programmatically it will little bit fast as it save xml parsing time but if you want a complex relative view it is better to use xml as then there would be no time saving as you have to add many lines of complex code to do so which could be done very easily through xml .
Upvotes: 1