views:

32

answers:

0

In Android I can create a file in res/values that contains data

<string-array name="array1">
<item>data01,data02,data03,data04 </item>
<item>data11,data12,data13,data14 </item>
<item>data21,data22,data23,data24 </item>
<item>data31,data32,data33,data34 </item>

and then read it in java

 String[] items;
 items = getResources().getStringArray(R.array.array1); 
 int numItems = items.length;
 String[] temp = items[i].split(",");

the code will extract the data from the file.

  1. Can I do something similar in Blackberry, what would be equivalent API to getResources().getStringArray and
  2. how would I define the file name. Android takes care of the file name on its own as long as it is in the res/values directory.
  3. Where should the file be?

Thanks

alan