I use productsList.add(p)...by using this the entire listview gets updated with the value of p (where p is an object) ... Instead i want to change only a particular row in listview depending on the position... below is the code fetching data from mysql.....please do help
@Override
public void onResponse(JSONObject response) {
Log.d(TAG, response.toString());
try {
JSONArray products = response.getJSONArray("products");
for (int i = 0; i < products.length(); i++) {
JSONObject product = (JSONObject) products.get(i);
String Id = product.getString("id");
String name = product.getString("name");
String description = product.getString("description");
Double mrp = Double.valueOf(product.getString("mrp"));
Double price = Double.valueOf(product.getString("price"));
String image = product.getString("image");
String sku = product.getString("sku");
Product p = new Product(id, name, description, mrp, price,
image, sku);
productsList.add(p);
notifyDataSetChanged();
}
}
};