如果数据成功存储在服务器上,我想要
更改图像资源
我使用此方法但不起作用
我应该怎么做
public void onResponse(String response) {
try {
JSONObject obj = new JSONObject(response);
if (!obj.getBoolean("error")) {
//if there is a success
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View listViewItem = inflater.inflate(R.layout.names, null, true);
ImageView imageViewStatus = (ImageView) listViewItem.findViewById(R.id.imageViewStatus);
imageViewStatus.setBackgroundResource(R.drawable.success);
} else {
//
}
} catch (JSONException e) {
e.printStackTrace();
}
}