package com.kickstarter.ui.viewholders;

import android.support.annotation.NonNull;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.kickstarter.R;
import com.kickstarter.models.Project;
import com.squareup.picasso.Picasso;

import butterknife.Bind;
import butterknife.ButterKnife;

public final class ProjectContextViewHolder extends KSViewHolder {
  private Project project;
  private final Delegate delegate;

  public @Bind(R.id.context_photo) ImageView projectContextImageView;
  public @Bind(R.id.project_name) TextView projectNameTextView;
  public @Bind(R.id.creator_name) TextView creatorNameTextView;

  public interface Delegate {
    void projectContextClicked(ProjectContextViewHolder viewHolder);
  }

  public ProjectContextViewHolder(@NonNull final View view, @NonNull final Delegate delegate) {
    super(view);
    this.delegate = delegate;
    ButterKnife.bind(this, view);
  }

  public void onBind(@NonNull final Object datum) {
    this.project = (Project) datum;

    Picasso.with(view.getContext()).load(project.photo().full()).into(projectContextImageView);
    projectNameTextView.setText(project.name());
    creatorNameTextView.setText(project.creator().name());
  }

  @Override
  public void onClick(@NonNull final View view) {
    delegate.projectContextClicked(this);
  }
}

@@ -34,16 +34,48 @@
 lders;%0A%0A
+import android.content.Context;%0A
 import a
@@ -228,111 +228,247 @@
 ter.
-R;%0Aimport com.kickstarter.models.Project;%0Aimport com.squareup.picasso.Picasso;%0A%0Aimport butterknife.Bind
+KSApplication;%0Aimport com.kickstarter.R;%0Aimport com.kickstarter.libs.KSString;%0Aimport com.kickstarter.models.Project;%0Aimport com.squareup.picasso.Picasso;%0A%0Aimport javax.inject.Inject;%0A%0Aimport butterknife.Bind;%0Aimport butterknife.BindString
 ;%0Aim
@@ -592,16 +592,43 @@
 roject;%0A
+  private Context context;%0A
   privat
@@ -654,29 +654,32 @@
 legate;%0A%0A  p
-ublic
+rotected
  @Bind(R.id.
@@ -723,37 +723,40 @@
 xtImageView;%0A  p
-ublic
+rotected
  @Bind(R.id.proj
@@ -798,21 +798,24 @@
 iew;%0A  p
-ublic
+rotected
  @Bind(R
@@ -861,16 +861,155 @@
 extView;
+%0A  protected @BindString(R.string.project_creator_by_creator) String projectCreatorByCreatorString;%0A%0A  protected @Inject KSString ksString;
 %0A%0A  publ
@@ -1140,16 +1140,22 @@
 wHolder(
+final 
 @NonNull
@@ -1147,38 +1147,32 @@
 (final @NonNull 
-final 
 View view, @NonN
@@ -1165,16 +1165,22 @@
 ew view,
+ final
  @NonNul
@@ -1181,22 +1181,16 @@
 NonNull 
-final 
 Delegate
@@ -1257,35 +1257,153 @@
     
-ButterKnife.bind(this, view
+this.context = view.getContext();%0A    ButterKnife.bind(this, view);%0A    ((KSApplication) context.getApplicationContext()).component().inject(this
 );%0A 
@@ -1427,16 +1427,22 @@
  onBind(
+final 
 @NonNull
@@ -1442,22 +1442,16 @@
 NonNull 
-final 
 Object d
@@ -1512,33 +1512,23 @@
 so.with(
-view.getC
+c
 ontext
-()
 ).load(p
@@ -1654,32 +1654,114 @@
 extView.setText(
+ksString.format(%0A      projectCreatorByCreatorString,%0A      %22creator_name%22,%0A      
 project.creator(
@@ -1764,24 +1764,30 @@
 tor().name()
+%0A    )
 );%0A  %7D%0A%0A  @O
@@ -1816,16 +1816,22 @@
 onClick(
+final 
 @NonNull
@@ -1831,22 +1831,16 @@
 NonNull 
-final 
 View vie

fix creator name string in ProjectContextViewHolder