title: How to add FooterView for RecyclerView
body: <p>Hi i am new for Android material designing and in my app i am using RecyclerView and i need to add footerView for this RecyclerView,I wrote below code for adding footerView </p>
  
  <p>But according to my code it's adding on Header why it's happening can some one help me how can i add this as a footerView</p>
  
  <h2>my code:-</h2>
  
  <pre><code>public class PersonalInformationRecyclerLanguagesAdapter extends RecyclerView.Adapter&lt;RecyclerView.ViewHolder&gt; {
  
      private static final int TYPE_FOOTER = 0;
      private static final int TYPE_ITEM = 1;
      RecyclerViewFooter recyclerViewFooter;
      private List&lt;LanguagesBean&gt; languagesBeanList;
      private Context context;
  
      public PersonalInformationRecyclerLanguagesAdapter(Context context, RecyclerViewFooter recyclerViewFooter, List&lt;LanguagesBean&gt; languagesBeanList) {
  
          this.context = context;
          this.recyclerViewFooter = recyclerViewFooter;
          this.languagesBeanList = languagesBeanList;
      }
  
      @Override
      public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
  
          if (viewType == TYPE_FOOTER) {
  
              View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.lagnguages_recyclerview_footer_layout, parent, false);
              return new VHFooter(v);
  
          } else if (viewType == TYPE_ITEM) {
  
              View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_languages_list_items, parent, false);
              return new VHItem(v);
          }
          return null;
      }
  
      @Override
      public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
  
          if (holder instanceof VHFooter) {
  
              VHFooter VHfooter = (VHFooter) holder;
              VHfooter.addMoreButton.setText(recyclerViewFooter.getAddMore());
              VHfooter.nextButton.setText(recyclerViewFooter.getNext());
  
          } else if (holder instanceof VHItem) {
  
              LanguagesBean currentItem = getItem(position - 1);
              VHItem VHitem = (VHItem) holder;
              VHitem.languageName.setText(currentItem.getName());
          }
      }
  
      private LanguagesBean getItem(int position) {
  
          return languagesBeanList.get(position);
      }
  
      @Override
      public int getItemCount() {
  
          return languagesBeanList.size() + 1;
      }
  
      @Override
      public int getItemViewType(int position) {
  
          if (isPositionFooter(position))
              return TYPE_FOOTER;
          return TYPE_ITEM;
      }
  
      private boolean isPositionFooter(int position) {
  
          return position == 0;
      }
  
      class VHFooter extends RecyclerView.ViewHolder {
  
          private Button addMoreButton, nextButton;
  
          public VHFooter(View itemView) {
  
              super(itemView);
              addMoreButton = (Button) itemView.findViewById(R.id.addMore_button);
              nextButton = (Button) itemView.findViewById(R.id.next_button);
          }
      }
  
      class VHItem extends RecyclerView.ViewHolder {
  
          private TextView languageName;
  
          public VHItem(View view) {
              super(view);
              languageName = (TextView) view.findViewById(R.id.language_textview);
          }
      }
  }
  </code></pre>
  
  <h2>Activity:-</h2>
  
  <pre><code> private void intializingView(View view) {
              //Implement Recycler View
              recyclerView = (RecyclerView) view.findViewById(R.id.languages_recyclerView);
              recyclerView.setHasFixedSize(true);
  
              LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
              recyclerView.setLayoutManager(layoutManager);
  
              languagesBeanArrayList = new ArrayList&lt;&gt;();
              setRecyclerViewData();
              personalInformationRecyclerLanguagesAdapter = new PersonalInformationRecyclerLanguagesAdapter(getActivity(), getFooter(), languagesBeanArrayList);
  
              //RecyclerView.ItemDecoration itemDecoration = new RecyclerViewDividerItemDecoration(getActivity());
              //recyclerView.addItemDecoration(itemDecoration);
  
              recyclerView.setAdapter(personalInformationRecyclerLanguagesAdapter);
  
          } catch (Throwable throwable) {
              throwable.printStackTrace();
          }
      }
  
      /**
       * setRecyclerViewData
       */
      private void setRecyclerViewData() {
  
          for (int i = 0; i &lt; 5; i++) {
              languagesBeanArrayList.add(new LanguagesBean("English", 1));
          }
      }
  </code></pre>