开发者

Is there getResources().getStringArray(R.array.array1); in BlackBerry java

开发者 https://www.devze.com 2023-01-03 19:33 出处:网络
In Android I can create a file in res/values that contains data <string-array name=\"array1\"> <item>data01,data02,data03,data04 </item>

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,dat开发者_如何学运维a33,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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号