title: How to handle a lot of different view types in recyclerview viewholder
body: <p>What if I have 50 types of views? Should I have 50 static inner classes in my adapter?
  According to <a href="https://stackoverflow.com/questions/26245139/how-to-create-recyclerview-with-multiple-view-type">this answer</a>, yes.</p>
  
  <p>My first thought was to move each viewholder inner class into a seperate public class, but they have to be static. So encapsulate each one into a public class, to make the inner class static? Are there any nicer alternatives?</p>
  
  <p>edit:
  code sample:
  So this would be a good solution? Doesn't this also kill performance?</p>
  
  <pre><code>public class MainViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
  View container;
  TextView title;
  
  //called in onCreateViewHolder in adapter
  public MainViewHolder(DragSortAdapter adapter, View itemView) {
      super(adapter, itemView);
  
      container = itemView.findViewById(R.id.card_root);
  
      title = container.findViewById(R.id.text);
  }
  //called by onBindViewHolder in adapter
  public void setData(Data data) {
      title.setText(data.title);
  }
  }
  </code></pre>
  
  <p>edit2:
  sample, for when a new instance is returned of the viewholder</p>
  
  <pre><code>@Override
  public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
       switch (viewType) {
           case 0: return new MainViewHolder(...);
           case 2: return new MainViewHolderOther(...);
           ...
       }
  }
  </code></pre>