title: Image is not updated on detail activity RecyclerView Android
body: <p>In my App I developed a News feature with RecaylerView widget. Now I want to pass CoverImage and Date from this recyclerView to detail page of news. I can pass date of the news successfully. But the cover image is not shown in the detail page. I have found 0 image in my logcat in android monitor window. I cannot not identify what would be the problem here.</p>
  
  <p>My Model class of news is-</p>
  
  <pre><code>public class NewsModel extends RealmObject {
       @PrimaryKey
  
      private int image;
      private String title;
      private String date;
      private String detail ;
      public NewsModel() {
  
      }
  
      public NewsModel(int image, String title, String date) {
          this.image = image;
          this.title = title;
          this.date = date;
      }
      public int getImage() {
          return image;
      }
  
      public void setImage(int image) {
          this.image = image;
      }
  
      public String getDate() {
          return date;
      }
  
      public void setDate(String date) {
          this.date = date;
      }
    ......
  
   }
  </code></pre>
  
  <p>My adaper class for  news page is</p>
  
  <pre><code>  public class NewsAdapter extends 
     RecyclerView.Adapter&lt;NewsAdapter.NewsHolder&gt; {
  
      private List&lt;NewsModel&gt; newsObject;
      private Context context;
  
      public NewsAdapter(Context context, List&lt;NewsModel&gt; newsObject) {
          this.context = context;
          this.newsObject=newsObject;
      }
  
      @Override
      public NewsHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View view = LayoutInflater.from(parent.getContext())
                  .inflate(R.layout.news_row_layout,parent,false);
          return new NewsHolder(view);
      }
  
      @Override
      public void onBindViewHolder(NewsAdapter.NewsHolder holder, int position) {
          final NewsModel newsModel=newsObject.get(position);
  
          holder.newsImage.setImageResource(newsModel.getImage());
          holder.newsHeadline.setText(newsModel.getTitle());
          holder.newsDate.setText(newsModel.getDate());
          holder.cardView.setTag(position);
          holder.cardView.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  int pos = (int)view.getTag();
                  openDetailNews(Integer.toString(newsModel.getImage()),newsModel.getDate());
              }
          });
  
      }
  
      //open Detail News Page
      private void openDetailNews(String...details) {
          Intent i=new Intent(context,DetailNews.class);
          i.putExtra("image",details[0]);
          i.putExtra("date",details[1]);
          context.startActivity(i);
      }
  
      @Override
      public int getItemCount() {
          return newsObject.size();
      }
  
      public class NewsHolder extends RecyclerView.ViewHolder {
  
          public CardView cardView;
          public ImageView newsImage;
          public TextView newsHeadline;
          public TextView newsDate;
  
          public NewsHolder(View itemView) {
              super(itemView);
              newsImage=(ImageView)itemView.findViewById(R.id.news_picture);
              newsHeadline=(TextView)itemView.findViewById(R.id.news_headline);
              newsDate=(TextView) itemView.findViewById(R.id.news_date);
              cardView=(CardView)itemView.findViewById(R.id.cardview_news);
          }
      }
  }
  </code></pre>
  
  <p>The detail news page code where I want to get the cover image and date from news page is-</p>
  
  <pre><code>    public class DetailNews extends AppCompatActivity {
  
      private RecyclerView recyclerView;
      private RecyclerView.Adapter adapter;
      private List&lt;NewsImageModel&gt; newsObject;
      ImageView _coverImage;
      TextView _description;
      TextView _newsDate;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.news_detail);
  
          // Showing and Enabling clicks on the Home/Up button
          if (getSupportActionBar() != null) {
              getSupportActionBar().setDisplayHomeAsUpEnabled(true);
              getSupportActionBar().setDisplayShowHomeEnabled(true);
          }
          newsObject=getAllImageList();
  
          // setting up views and stuff
          setUpUIViews();
  
          Intent intent = getIntent();
  
          //RECEIVE DATA
          Log.e("_coverImage",""+_coverImage);
          Integer coverImage=intent.getExtras().getInt("image");
          Log.e("coverImage",""+coverImage);
          String newsDate=intent.getExtras().getString("date");
  
          //BIND DATA
          _coverImage.setImageResource(coverImage);
          Log.e("coverImage",""+coverImage);
          _newsDate.setText(newsDate);
  
      }
  
      private void setUpUIViews() {
          _coverImage=(ImageView)findViewById(R.id.news_cover);
          _description=(TextView)findViewById(R.id.news_description);
          _newsDate=(TextView)findViewById(R.id.news_date);
  
          recyclerView = (RecyclerView)findViewById(R.id.image_list);
          recyclerView.setHasFixedSize(true);
          RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(DetailNews.this);
          recyclerView.setLayoutManager(layoutManager);
  
          adapter = new NewsDetailAdapter(this,newsObject );
          recyclerView.setAdapter(adapter);
      }
  
      private List&lt;NewsImageModel&gt; getAllImageList() {
          List&lt;NewsImageModel&gt; images = new ArrayList&lt;NewsImageModel&gt;();
  
          ......
  
          return  images;
  
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
         ...
      }
  }
  </code></pre>