I am sorry for the subject, but I do not know how to match my question.
In my strings.xml I have different languages eg
getString(R.string.report_TJ)
and I get json data with
e.getString("artID")
but I need something like this:
getString(R.string.report_TJ_1)
you see, at the end 1. artID = 1
How can I do it?
I try it like this:
try{
//String text = getString(R.string.report_TJ);
JSONArray earthquakes = json.getJSONArray("uTraf");
mylist.clear();
String report_TJ_btn = null;
for(int i=0;i<earthquakes.length();i++){
HashMap<String, String> map = new HashMap<String, String>();
JSONObject e = earthquakes.getJSONObject(i);
String imageString=report_TJ_btn+e.getString("artID");
map.put("id", String.valueOf(i));
map.put("first", getString(getResources().getIdentifier(imageString, "", getPackageName())) + "Stau: " + e.getString("road") + ", " + e.getString("county"));
map.put("second", e.getString("timestamp") + ", " + e.getString("suburb"));
mylist.add(map);
}
}
with this error:
11-29 10:40:08.544: W/ResourceType(487): No package identifier when getting value for resource number 0x00000000
you can use like this