I am uploading data to server, and if data successfully uploaded to server then i am showing "Saved", like you can see "Uploaded" for image.
But the issue is, i have stored data for the first item row, whereas getting "Saved" text in different row item
holder.textDataStatus.setText(ImageList.get(position).getData());
protected void onPostExecute(String file_url) {
// dismiss the dialog once product deleted
pDialog.dismiss();
try {
// Prepare Save Data
if(strStatusId.equals("0"))
{
Toast.makeText(UploadImagesActivity.this, "Unable to upload", Toast.LENGTH_SHORT).show();
}
else if (strStatusId.equals("1"))
{
Toast.makeText(UploadImagesActivity.this, "Data Uploaded Successfully", Toast.LENGTH_SHORT).show();
ImageList.get(position).setData("Saved");
Log.d("strData:", fileName); // getting correct tapped item
mAdapter.notifyDataSetChanged();
}
else
{
Toast.makeText(UploadImagesActivity.this, "Unable to upload", Toast.LENGTH_SHORT).show();
}
} catch (Exception e) {
// TODO: handle exception
}
if (file_url != null){
Toast.makeText(UploadImagesActivity.this, file_url, Toast.LENGTH_LONG).show();
}