title: Android - RecyclerView - items positions issue
body: <p>i have one activity that contains on RecyclerView.
  to insert a new item, there are a custom dialog that contains on two editText and one spinner used to get some information required from user and then returns this information back and displayed it in recyclerView
  see the image</p>
  
  <p><a href="https://i.stack.imgur.com/iwGIW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iwGIW.jpg" alt="enter image description here"></a></p>
  
  <p>this is the custom dialog witch i used to insert new item,
  if you see the number of each item , there is no problem until now.</p>
  
  <p><a href="https://i.stack.imgur.com/xkivh.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xkivh.jpg" alt="enter image description here"></a></p>
  
  <p>when the soft input appears(keyboard), then there are some thing happen on the items, the positions of some of them are changed</p>
  
  <p><a href="https://i.stack.imgur.com/F6HaO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F6HaO.jpg" alt="enter image description here"></a></p>
  
  <p>see the positions of the last items !</p>
  
  <p>it is changed</p>
  
  <p><a href="https://i.stack.imgur.com/HpK3n.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HpK3n.jpg" alt="enter image description here"></a></p>
  
  <p>the cancel button on the dialog does nothing,</p>
  
  <p>this is the recycleView after dismiss the custom dialog</p>
  
  <p><a href="https://i.stack.imgur.com/Bssgm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bssgm.jpg" alt="enter image description here"></a></p>
  
  <p>i think the problem is happen because the recycling feature.</p>
  
  <p>adapter used for recyclerView :</p>
  
  <pre><code>private class RecyclerAdapter extends RecyclerView.Adapter&lt;RecyclerAdapter.ViewHolder&gt;
  {
      private View courseView;
      private TextView courseNo;
      private TextView courseName ;
      private TextView courseHours;
      private TextView courseGrades;
  
      protected class ViewHolder extends RecyclerView.ViewHolder{
  
          public ViewHolder(View itemView) {
              super(itemView);
              courseView = itemView;
          }
      }
  
      @Override
      public RecyclerAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
  
          courseView = LayoutInflater
                  .from(parent.getContext()).inflate(R.layout.view_course,parent,false);
  
          courseNo = (TextView)courseView.findViewById(R.id.view_course_textView_no);
          courseName = (TextView)courseView.findViewById(R.id.view_course_textView_name);
          courseHours = (TextView)courseView.findViewById(R.id.view_course_textView_hours_value);
          courseGrades = (TextView)courseView.findViewById(R.id.view_course_textView_grade_value);
  
          ViewHolder holder = new ViewHolder(courseView);
          return holder;
      }
  
      @Override
      public void onBindViewHolder(RecyclerAdapter.ViewHolder holder, int position) {
          final int coursePosition = position;
          courseNo.setText(position+1+"");
          courseName.setText(courses.get(position).getName());
          courseHours.setText(courses.get(position).getHours()+"");
          courseGrades.setText(courses.get(position).getGrade()+"");
  
          courseView.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  editDialog(coursePosition);
              }
          });
  
  
      }
  
      @Override
      public int getItemCount() {
          return courses.size();
      }
  }
  </code></pre>
  
  <p>where <strong>courses</strong> is List of items</p>