title: How i can add List of items to my RecyclerView adapter
body: <p>in onLoadFinsih i get back from the server List of movies i want to </p>
  
  <p>add this list to my RecyclerView adapter </p>
  
  <p>i tried to create  List of movies and pass it to my RecyclerView adapter 
  then when i get the list of movies from the server in onLoadFinish method i add
  this list to the list that i passed in the adapter then notify the adapter 
  but not working </p>
  
  <pre><code>public class MainActivity extends AppCompatActivity
      implements LoaderManager.LoaderCallbacks&lt;List&lt;Movie&gt;&gt;{
  
          private RecyclerView.Adapter movieRecyclerViewAdapter;
          private RecyclerView.LayoutManager mLayoutManager;
          private List&lt;Movie&gt; mListOfMovies;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
      progressBar = (ProgressBar) findViewById(R.id.progress_bar);
  
      RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
  
      mListOfMovies = new ArrayList&lt;&gt;();
  
      movieRecyclerViewAdapter = new MovieItemAdapter(this, mListOfMovies);
      mLayoutManager = new LinearLayoutManager(this);
  
      recyclerView.setAdapter(movieRecyclerViewAdapter);
  
  }
  @Override
  public void onLoadFinished(Loader&lt;List&lt;Movie&gt;&gt; loader, List&lt;Movie&gt; movies) {
      //hide progress bar after fetch data from server
      progressBar.setVisibility(View.GONE);
  
      mListOfMovies.clear();
  
      mListOfMovies.addAll(movies);
  
      movieRecyclerViewAdapter.notifyItemRangeChanged();
  
  }
  
  
  
  public class MovieItemAdapter extends RecyclerView.Adapter&lt;MovieItemAdapter.ViewHolder&gt; {
  
  private List&lt;Movie&gt; mListOfMovies;
  private Context mContext;
  
  public MovieItemAdapter(Context context, List&lt;Movie&gt; movies) {
      this.mListOfMovies = movies;
      this.mContext = context;
  }
  
  @Override
  public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
      View view = LayoutInflater.from(mContext)
              .inflate(R.layout.movie_list_item, parent, false);
      ViewHolder viewHolder = new ViewHolder(view);
      return viewHolder;
  }
  
  @Override
  public void onBindViewHolder(ViewHolder holder, int position) {
      Movie movieItem = mListOfMovies.get(position);
  
      holder.moviePoster.setImageBitmap(movieItem.getBitmap());
      holder.movieName.setText(movieItem.getTitle());
  
      DecimalFormat format = new DecimalFormat("0.0");
      holder.voteAverage.setText(format.format(movieItem.getVoteAverage()));
      holder.releaseDate.setText(movieItem.getReleaseDate());
  }
  
  @Override
  public int getItemCount() {
      return mListOfMovies.size();
  }
  
  public static class ViewHolder extends RecyclerView.ViewHolder {
  
      public ImageView moviePoster;
      public TextView movieName;
      public TextView voteAverage;
      public TextView releaseDate;
  
      public ViewHolder(View itemView) {
          super(itemView);
  
          moviePoster = (ImageView) itemView.findViewById(R.id.movie_poster);
          movieName = (TextView) itemView.findViewById(R.id.movie_name);
          voteAverage = (TextView) itemView.findViewById(R.id.vote_average);
          releaseDate = (TextView) itemView.findViewById(R.id.release_date);
      }
  }
  </code></pre>
  
  <p>}</p>