I was trying the code for NASA(image of the day) RSS feed given in the book, but as i tried getting a reference to the image as follows(Page no :108 of book"Head first android development")
ImageView imageView=(ImageView)findViewById(R.id.imageDisplay);
imageView.setImageBitmap(image);
I am getting following error;
"Cannot cast from TextView to ImageView".
What can be the cause for this error and how to correct it?
Following is the method where above code snippet occurs;
private void resetDisplay(String title,String date,String imageUrl,String description)
{
TextView titleView = (TextView)findViewById(R.id.imageTitle);
titleView.setText(title);
TextView dateView =(TextView)findViewById(R.id.imageDate);
dateView.setText(date);
ImageView imageView=(ImageView)findViewById(R.id.imageDisplay);
imageView.setImageBitmap(image);
TextView descriptionView =(TextView)findViewById(R.id.imageDescription);
descriptionView.setText(description);
}

Help

