I'm having difficulty displaying images in a ListView.
Different images for the different items I want, however, what I am getting is:
you can see that icons being displayed are identical (booking). What can not be done so far is to find the method itemImagesViews.setImageResource (itemsImages.getResourceId (status, R.drawable.booking))
to ItemAdapter.java
file is not expected Is returning.
This is a repo:
ItemAdapter me The code does not know in java, but basically all you have to do is, if you want to see the booking icon:
itemImagesViews.setImageResource (R.drawable.booking);
Note: I do not know what code setup is with getResourceId () and maybe this is the main problem.
Another good solution recommended by Google, I think:
resource processing = matching resource (); ItemImagesViews SetImageDrawable (resources.getDrawable (R.drawable.myfirstimage));
Note: Item images are your image view. The SetImageDrawable method is considered to be more efficient with larger images.
No comments:
Post a Comment