This is my screenshot

This is 1 list item (contains 1 image and 3 image buttons and an identifier). My ListView has 50 ListItem.
in this case, when the user clicks on the button (first button), updates the value and sets the text to this specific position (this works). But it repeats a value similar to this (when you click on the first one, like the button-> Position 0, then it repeats the value for the 4th, 7th, etc. Position.
How to solve the problem of repeating the given text for each 4th element?
Please help me. Thanks at Advance.
My code is, / ** Adapter class * /
public class Adapter1 extends BaseAdapter {
ImageView imgUnlike[] = null, imgLike[] = null,
imgComments[] = null;
TextView txtLikeUnlike[] = null, txtComments[] = null,
public ArrayList<HashMap<String, String>> arr = null;
Context context = null;
LayoutInflater layoutInflater = null;
HashMap<String, String> getData = new HashMap<String, String>();
String urlLike = null, urlCountLike = null, urlUnlike = null;
String strCountLike = null, strCountCommnets = null;
public Adapter1(Context context,
ArrayList<HashMap<String, String>> arr) {
this.context = context;
this.arr = arr;
layoutInflater = LayoutInflater.from(context);
this.imgUnlike = new ImageView[arr.size()];
this.imgLike = new ImageView[arr.size()];
this.imgComments = new ImageView[arr.size()];
this.txtLikeUnlike = new TextView[arr.size()];
}
@Override
public int getCount() {
return arr.size();
}
@Override
public Object getItem(int position) {
return arr.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@SuppressLint("InflateParams")
@Override
public View getView(final int position, View convertView,
ViewGroup parent) {
View row = null;
if (convertView == null) {
LayoutInflater inflater = ((Activity) context)
.getLayoutInflater();
row = inflater.inflate(R.layout.list_item, parent,
false);
} else {
row = convertView;
}
imgUnlike[position] = (ImageView) row
.findViewById(R.id.imgUnlike);
imgLike[position] = (ImageView) row
.findViewById(R.id.imgLike);
txtLikeUnlike[position] = (TextView) row
.findViewById(R.id.txtLikeUnlike);
getData = arr.get(position);
txtLikeUnlike[position].setText(getData
.get(Fragment1.TAG_TOTAL_LIKE_COUNT));
imgUnlike[position]
.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
imgUnlike[position]
.setVisibility(View.INVISIBLE);
imgLike[position]
.setVisibility(View.VISIBLE);
strPostId = arr.get(position).get(
Fragment1.TAG_POST_ID);
urlLike = Urls.BASE_URL
+ "createpostlike.php?post_id=" + strPostId
+ "&user_id=" + myDetail.getUserId();
getCurrentPosition = position;
new sendLikeData().execute();
}
});
imgLike[position].setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
imgLike[position].setVisibility(View.INVISIBLE);
imgUnlike[position].setVisibility(View.VISIBLE);
urlGetAllLike = Urls.BASE_URL + "getlike.php";
getCurrentPosition = position;
new getAllLikeData().execute();
}
});
return row;
}
public class sendLikeData extends AsyncTask<Void, Void, Void> {
protected void onPreExecute() {
super.onPreExecute();
}
@Override
protected Void doInBackground(Void... arg0) {
ServiceHandler sh = new ServiceHandler();
String jsonStr = sh
.makeServiceCall(urlLike, ServiceHandler.GET);
return null;
}
protected void onPostExecute(Void result) {
super.onPostExecute(result);
urlCountLike = Urls.BASE_URL + "getalllike.php?post_id="
+ strPostId;
new getCountLikeData().execute();
};
}
private class getCountLikeData extends AsyncTask<Void, Void, Void> {
JSONObject jsonobject;
@Override
protected void onPreExecute() {
super.onPreExecute();
}
@Override
protected Void doInBackground(Void... arg0) {
dataList = new ArrayList<HashMap<String, String>>();
jsonobject = JSONFunctions.getJSONfromURL(urlCountLike);
try {
jsonarray = jsonobject.getJSONArray("data");
for (int i = jsonarray.length() - 1; i < jsonarray.length(); i++) {
jsonobject = jsonarray.getJSONObject(i);
strCountLike = jsonobject.getString("Total");
}
} catch (JSONException e) {
Log.e("Error", e.getMessage());
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void result) {
super.onPostExecute(result);
Adapter1.notifyDataSetChanged();
txtLikeUnlike[getCurrentPosition].setText(strCountLike);
}
}