package xyz.husten.finstergram.ui.finstergrams;

import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.squareup.picasso.Picasso;
import java.util.List;
import xyz.husten.finstergram.R;
import xyz.husten.finstergram.model.Result;

public class FinstergramsAdapter extends RecyclerView.Adapter<FinstergramsAdapter.ResultViewHolder> {
  private List<Result> items;
  private final Picasso picasso;
  private final OnResultClickListener clickListener;

  public FinstergramsAdapter(List<Result> items, Picasso picasso, OnResultClickListener clickListener) {
    this.items = items;
    this.picasso = picasso;
    this.clickListener = clickListener;
  }

  @Override public ResultViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View view = LayoutInflater.from(parent.getContext())
        .inflate(R.layout.layout_result_view, parent, false);
    return new ResultViewHolder(view);
  }

  @Override public void onBindViewHolder(ResultViewHolder holder, int position) {
    final Result result = items.get(position);
    holder.likeCount.setText("❤️ " + result.likes.count);
    picasso.load(result.images.thumbnail.url).into(holder.imageView);
    picasso.load(result.images.thumbnail.url).fit().into(holder.imageView);
    holder.itemView.setOnClickListener(new View.OnClickListener() {
      @Override public void onClick(View v) {
        clickListener.onClick(result);
      }
    });

  }

  @Override public int getItemCount() {
    return items.size();
  }

  public static class ResultViewHolder extends RecyclerView.ViewHolder {
    @BindView(R.id.iv_image) ImageView imageView;
    @BindView(R.id.tv_like_count) TextView likeCount;

    public ResultViewHolder(View itemView) {
      super(itemView);
      ButterKnife.bind(this, itemView);
    }
  }

  public interface OnResultClickListener {
    void onClick(Result result);
  }
}

@@ -1247,24 +1247,45 @@
 sition);%0A   
+ final String likes =
  holder.like
@@ -1294,112 +1294,102 @@
 unt.
-setText(%22%E2%9D%A4%EF%B8%8F %22 + result.likes.count);%0A    picasso.load(result.images.thumbnail.url).into(holder.imageView
+getContext().getString(R.string.likes, result.likes.count);%0A    holder.likeCount.setText(likes
 );%0A 

use R.string.likes for binding to the viewholder