I am making an offline encyclopedia app. So large text data must be stored for using them when required. So is it a good practice to use strings.xml resource file to store such large amount of text data? Will it result in any kind of performance issues?
A string resource provides text strings for your application with optional text styling and formatting. There are three types of resources that can provide your application with strings: String. XML resource that provides a single string.
One of the main benefits is for localization: you keep your code language-independent and just need to provide a different XML file for each language you want to support.
The XML resource files containing localized strings are placed in subfolders of the project's res folder.
xml is a resource file used to hold name/value pairs of strings.
Yes, of course. it's better to use for your text even large static text. Check some useful links for better understanding: Which is better when storing some large texts: strings in XML resource file or a java Strings in a class
Load Large Text in Android
http://developer.android.com/guide/topics/resources/string-resource.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With