我想实时更新列表视图中的 TextView。我有一个套接字连接,我正在其中收听 json 消息,我想解析/识别 json 以更新现有列表中的 5 个 TextView 之一。
responseid=object.getString("ResponseID");
if(responseid!=null){
for(int j=0;j<myList.size();j++){
//If value match then I want to update the textView of that particular row
if(myList.get(j).getName().equals(cid)) {
//I successfully get the value of Textview of particular row of Listview now I want to update the this Textview with item variable below.
String item = (String) myAdapter.getItem(j).getName();
//Here i want to update Textview
myAdapter.notifyDataSetChanged();
}
}
}