title: how to inject custom arrayadapter into fragment using roboguice 2.0
body: <p>I have a fragment that contains a listView. The fragment extends roboFragment. The listView has a custom adapter that sets up different UI elements in the getView method. I want to use @InjectView to get the ui elements. I understand that in order to do this, I need to also create the adapter using guice and not the new operator. So this is what my fragment does:</p>
  
  <pre class="lang-java prettyprint-override"><code>@Inject
  TweetsActivityAdapter tweetsAdapter;
  </code></pre>
  
  <p>The adapter looks like this:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class TweetsActivityAdapter extends ArrayAdapter&lt;ITweet&gt; {
  
      @InjectView(R.id.ivProfilePic)
      ImageView ivProfilePic;
  
      @InjectView(R.id.tvUserName)
      TextView tvUserName;
  
      @InjectView(R.id.tvTweet)
      TextView tvTweet;
  
      private final static String tag = 
          "Debug - com.codepath.upkar.twitterapp.TweetsActivityAdapter";
  
      @Inject
      public TweetsActivityAdapter(Context context, List&lt;ITweet&gt; tweets) {
          super(context, 0, tweets);
      }
  </code></pre>
  
  <p>I read that I need to configure guice and tell it where to get ITweet from. ITweet is just the interface for Tweet model class.</p>
  
  <pre class="lang-java prettyprint-override"><code>public interface ITweet {
  
      public User getUser();
  
      public void setUser(User user);
  
      public String getBody();
  
      public long getId();
  
      public long getStrId();
  
      public boolean isFavorited();
  
      public boolean isRetweeted();
  }
  </code></pre>
  
  <p>How do I create a binding for the List? I am currently getting an error:</p>
  
  <pre><code>FATAL EXCEPTION: main
  E/AndroidRuntime(18753): java.lang.RuntimeException: Unable to start activity 
  ComponentInfo{com.bindaas.twitterapp/com.bindaas.twitterapp.activities
    .TwitterAppActivity}: com.google.inject.ConfigurationException: 
  Guice configuration errors:
  E/AndroidRuntime(18753): 1) No implementation for 
     java.util.List&lt;com.bindaas.twitterapp.models.ITweet&gt; was bound.
  </code></pre>
  
  <p>My module is as follows:
  public class MyCustomModule implements Module {</p>
  
  <pre class="lang-java prettyprint-override"><code>    @Override
      public void configure(Binder binder) {
          binder.bind(ITweet.class).to(Tweet.class);
      }
  }
  </code></pre>