Search code examples
androidxmlperformanceandroid-studioandroid-shortcut

Android shortcut to write multiple lines of code


I am writing an string array in the string.xml file in android, it is of 300 elements which has incrementing values, just like the one mentioned below with 5 elements :

<string-array name="values">
        <item>Item 1</item>
        <item>Item 2</item>
        <item>Item 3</item>
        <item>Item 4</item>
        <item>Item 5</item>
        <item>Item 6</item>
 </string-array>

Is there any shortcut to write this code in the xml file?


Solution

  • Try emmet plugin for android studio, it is very helpful when you have to write long serialized xml code, plus it saves a huge time.