title: getItemViewType in my recyclerview
body: <p>I got this problem with my adapter and couldn't guess the solution. It's about a multiple view in my recyclerview (2 exactly):
   - Head
   - List</p>
  
  <p>everything works fine only for the list which the first row doesn't come
  here is my adapter code:</p>
  
  <pre><code> public class CardAdapterPorfileview extends RecyclerView.Adapter&lt;RecyclerView.ViewHolder&gt; {
      private ImageLoader imageLoader;
      private Context mcontext;
      public static final int Head = 1;
      public static final int List = 0;
      List&lt;ProfileFeed&gt; ProfileFeeds;
      @Override
      public int getItemViewType(int position) {
  
          return (position == 0? Head : List);
      }
  
      public CardAdapterPorfileview(List&lt;ProfileFeed&gt; dataSet, Context context) {
          this.ProfileFeeds = dataSet;
          this.mcontext = context;
      }
  
      @Override
      public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View v;
          switch (viewType) {
  
              case Head:
                  return new ViewHolderHead(LayoutInflater.from(parent.getContext()).inflate(R.layout.profilestar_head, parent, false));
  
              case List:
                  return new ViewHolderlist(LayoutInflater.from(parent.getContext()).inflate(R.layout.profilestar_feed, parent, false));
          }
          throw new RuntimeException("there is no type that matches the type " + viewType + " + make sure your using types correctly");
      }
      //imgLoader1.displayImage(imageprofile, holder1.imageviewProf);
      //imgLoader1.displayImage(imagecover, holder1.imageviewCover);
      @Override
      public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
          ProfileFeed feed = ProfileFeeds.get(position);
          imageLoader = CustomVolleyRequest.getInstance(context).getImageLoader();
          switch (getItemViewType(position)) {
              case Head:
                  ViewHolderHead holder1 = (ViewHolderHead) holder;
                  holder1.biographie.setText(linebio);
                  imageLoader.get(lineimageprofile, ImageLoader.getImageListener(holder1.imageviewProf, R.mipmap.blank, android.R.drawable.ic_dialog_alert));
                  holder1.imageviewProf.setImageUrl(lineimageprofile, imageLoader);
                  imageLoader.get(lineimagecover, ImageLoader.getImageListener(holder1.imageviewCover, R.mipmap.blank, android.R.drawable.ic_dialog_alert));
                  holder1.imageviewCover.setImageUrl(lineimagecover, imageLoader);
                  registerForContextMenu(holder1.imageviewProf);
                  holder1.imageviewProf.setFocusable(true);
                  holder1.imageviewProf.setClickable(true);
                  registerForContextMenu(holder1.imageviewCover);
                  holder1.imageviewCover.setFocusable(true);
                  holder1.imageviewCover.setClickable(true);
                  break;
  
              case List:
                  ViewHolderlist holder2 = (ViewHolderlist) holder;
                  imageLoader = CustomVolleyRequest.getInstance(context).getImageLoader();
                  imageLoader.get(feed.getImageUrl(), ImageLoader.getImageListener(holder2.imageView, R.mipmap.blank, android.R.drawable.ic_dialog_alert));
                  holder2.textViewuserName.setText(feed.getuserName());
                  holder2.textViewName.setText(feed.getCaption());
                  holder2.imageView.setImageUrl(feed.getImageUrl(), imageLoader);
                  holder2.textViewid.setText(feed.getpostID());
                  holder2.textTime.setText(feed.getTime());
                  break;
          }
      }
  
  
  
      @Override
      public int getItemCount() {
          return ProfileFeeds.size();
      }
  
      class ViewHolderHead extends RecyclerView.ViewHolder {
  
          public NetworkImageView imageviewProf;
          public NetworkImageView imageviewCover;
          public TextView biographie;
  
          public ViewHolderHead(View itemView) {
              super(itemView);
              imageviewProf = (NetworkImageView) itemView.findViewById(R.id.imageViewProfilePicture1);
              imageviewCover = (NetworkImageView) itemView.findViewById(R.id.imageViewProfileCover);
              biographie = (TextView) itemView.findViewById(R.id.textbio);
          }
      }
  
      class ViewHolderlist extends RecyclerView.ViewHolder {
          public NetworkImageView imageView;
          public TextView textViewName;
          public TextView textViewuserName;
          public TextView textViewid;
          public TextView textTime;
  
          public ViewHolderlist(View itemView) {
              super(itemView);
              imageView = (NetworkImageView) itemView.findViewById(R.id.imageViewnewsfeedprofile);
              textViewName = (TextView) itemView.findViewById(R.id.textViewNameprofile);
              textViewuserName = (TextView) itemView.findViewById(R.id.textusernamenewsfeedprofile);
              textViewid = (TextView) itemView.findViewById(R.id.textPostIDprofile);
              textTime = (TextView) itemView.findViewById(R.id.textTimeprofile);
  
          }
      }
  }
  </code></pre>
  
  <p>Thanks a lot</p>