title: Should I be using something other than getResource().getStringArray() to populate a large array?
body: <p>Following the Android <a href="http://developer.android.com/resources/tutorials/views/hello-listview.html" rel="noreferrer">sample for populating a ListView</a>, I query an array from my <em>strings.xml</em> using <a href="http://developer.android.com/reference/android/content/res/Resources.html#getStringArray(int)" rel="noreferrer">Activity.getResource().getStringArray()</a>:</p>
  
  <pre><code>String [] mDefinitions = getResources().getStringArray(R.array.definition_array);
  </code></pre>
  
  <p>The documentation for this method is pretty clear and I didn't expect to encounter any problems with it:</p>
  
  <blockquote>
    <p>Return the string array associated with a particular resource ID.</p>
  </blockquote>
  
  <p>This approach worked as expected for small data sets. However, when I populated <em>strings.xml</em> with the full data set (close to 2000 entries), I find that the app crashed when it tried to load the resource.  I noticed this error in the console log:</p>
  
  <blockquote>
    <p>ReferenceTable overflow (max=512)</p>
  </blockquote>
  
  <p>Playing around with the number of items in my <em>string-array</em> I confirmed that the error was reproducible when the number of items exceeded ~700 entries.</p>
  
  <p>Googling the problem has turned up some examples of other developers <a href="http://www.listware.net/201005/android-developers/4451-android-developers-max-size-of-string-array.html" rel="noreferrer">having the same problem</a>, but I can't find anything in the Android documentation to explain it. </p>
  
  <p>Someone has gone to the trouble of creating an <a href="http://code.google.com/p/android/issues/detail?id=5287" rel="noreferrer">issue for the problem</a> on the Android Google Code page but neither it, or any of the posts I came across, received a satisfactory answer.</p>
  
  <p>Am I approaching the problem the wrong way? Should I be populating the data myself (loading a file and parsing JSON or similar) and avoid the issue entirely? It feels like I am missing something obvious here.</p>