开发者

Using listField to display Json string

I am retrieving a string of values from json url. I have done it like...

for(int i=0;i<totalList;i++){
  String strAlert=jsArrShpList.get(i).toString();
  JSONObject joAlert=new JSONObject(strAlert);
  String shoppingList = joAlert.get("CategoryName").toString();

}

Now i want to add the strings to a list field and i want to get selected index. So plz help me out on开发者_如何学运维 how to do it and some sample code will be really helpful...


To get selected index you can use the method getSelectedIndex() from the ListField. See here for an example on how to add new items on the ListField.

See an introductory tutorial about list fields here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜