Reputation: 2789
I'm curious on how much bit or byte does a line in XML (values, settings, strings, dimensions..et cetera) has in Android?
I could not find something yet in here or online, so please direct me to the link if it already exists or provide an answer to the question.
Example: Let's say I have
1: dimens.xml file with the following:
and I have another
**2: dimens.xml file with the following:
Does that make any difference as far as size? Will having more lines in my first dimens make my app "heavier" than the one with only fewer lines?
Upvotes: 0
Views: 89
Reputation: 4641
Your XML-File is compiled so that the dimension is an Object. If the XML-value is not used, it would probably be removed by the compiler. If you have several XML-files for the same value the compiler would use the property valid for the current module/flavour/etc.
See https://developer.android.com/guide/topics/resources/providing-resources.html for the confirmation (search for 'compile'). Furthermore the generated R-class is showing this.
Upvotes: 1
Reputation: 5600
The String limit size is 2,147,483,647 characters. It does not matter the size of a line if the String has this limit.
Upvotes: 0