Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it okay to use strings.xml Resource file for storing large text in Android?

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?

like image 460
Shahabas Shakeer Avatar asked Dec 17 '15 11:12

Shahabas Shakeer


People also ask

What is the use of string XML file in Android?

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.

What is the advantage of making strings in strings XML file?

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.

In which folder can you find the string resource file strings XML?

The XML resource files containing localized strings are placed in subfolders of the project's res folder.

Is a resource file used to hold name value pairs of strings?

xml is a resource file used to hold name/value pairs of strings.


1 Answers

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

like image 101
Androider Avatar answered Oct 20 '22 06:10

Androider