Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Split the String xml into 2 files

Tags:

android

I want to put my "help text" in an xml so I can read it fro XML and setTextView to it. I know I can use the String resource. But I was wondering if I can create another file in my resources folder and add string items to it so I can use it for my textview. I don't want my long strings of "help" to be in the same file as my string resources. Is this possible in android or do I need to jam all Strings of my app in one file

Thank you

like image 561
Snake Avatar asked Apr 03 '14 01:04

Snake


People also ask

How do I split multiple XML files?

Split large XML file in Windows (Method #1) First, click the “Add XML File(s)” button to provide the input path of the file to split, or easily drag and drop your files. Then select the tag by which the new file will be split. Next, choose after what period of tags to split into a new file.

How do I partition an XML file?

Partition the original XML file into, say 100, XML subfiles based on the first two digits of the "code" attribute of each <measure> node. That is, new 100 XML files (named 'part_00. xml' to 'part_99. xml') need to be created and each <measure> element must be appended to the corresponding subfile.


1 Answers

You can create as many files in the /res/values directory as you want. They don't all need to be strings.xml - just create a new file called help_strings.xml and put what you need in there or create multiple xml files if you want to split them up. As long as each string has a unique resource id it will work.

like image 171
Amit Maskery Avatar answered Sep 29 '22 16:09

Amit Maskery