{"action":"closed","issue":{"url":"https://api.github.com/repos/square/picasso/issues/1111","labels_url":"https://api.github.com/repos/square/picasso/issues/1111/labels{/name}","comments_url":"https://api.github.com/repos/square/picasso/issues/1111/comments","events_url":"https://api.github.com/repos/square/picasso/issues/1111/events","html_url":"https://github.com/square/picasso/issues/1111","id":100722039,"number":1111,"title":"Wrong image getting loaded in adapter","user":{"login":"dhrushilbadani","id":10662945,"avatar_url":"https://avatars.githubusercontent.com/u/10662945?v=3","gravatar_id":"","url":"https://api.github.com/users/dhrushilbadani","html_url":"https://github.com/dhrushilbadani","followers_url":"https://api.github.com/users/dhrushilbadani/followers","following_url":"https://api.github.com/users/dhrushilbadani/following{/other_user}","gists_url":"https://api.github.com/users/dhrushilbadani/gists{/gist_id}","starred_url":"https://api.github.com/users/dhrushilbadani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhrushilbadani/subscriptions","organizations_url":"https://api.github.com/users/dhrushilbadani/orgs","repos_url":"https://api.github.com/users/dhrushilbadani/repos","events_url":"https://api.github.com/users/dhrushilbadani/events{/privacy}","received_events_url":"https://api.github.com/users/dhrushilbadani/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-13T09:18:45Z","updated_at":"2015-08-13T15:10:57Z","closed_at":"2015-08-13T15:10:57Z","body":"I have an adapter with a getView that displays an image (setting it as the background for the view using a Target) and the title of the image together. Now, the images get interchanged on scrolling for some reason. As in, if image1 is for text1 and image2 is for text2, it gets swapped. Any idea on how I can fix this? Here's the code for the getView method of my adapter:\r\n\r\n{\r\npublic View getView(final int position, View convertView, ViewGroup parent) {\r\n        if (convertView == null) {\r\n            LayoutInflater inflater = (LayoutInflater) mContext\r\n                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n            postSingle = new View(mContext);\r\n            postSingle = inflater.inflate(R.layout.post_single, null);\r\n        } else {\r\n            postSingle = convertView;\r\n        }\r\n            ImageView postImage = (ImageView) postSingle.findViewById(R.id.postImage);\r\n            Picasso.with(mContext).cancelRequest(postImage);\r\n            TextView titleText = (TextView) postSingle.findViewById(R.id.titleText);\r\n            TextView dateText = (TextView) postSingle.findViewById(R.id.dateText);\r\n            TextView usernameText = (TextView) postSingle.findViewById(R.id.usernameText);\r\n            TextView likesText = (TextView) postSingle.findViewById(R.id.likesText);\r\n            TextView dislikesText = (TextView) postSingle.findViewById(R.id.dislikesText);\r\n            TextView commentsText = (TextView) postSingle.findViewById(R.id.commentsText);\r\n            String useURL = \"\";\r\n            //Log.d(\"useURL\", useURL);\r\n            useURL = \"http://www.somewebsite.com/\" + mPic_urlList.get(position);\r\n            if (useURL != \"\") {\r\n                //Picasso.with(mContext).load(useURL.replaceAll(\" \", \"%20\")).into(postImage);\r\n                Picasso.with(mContext).load(useURL).resize(postSingle.getWidth(), 280).into(new Target() {\r\n\r\n                    @Override\r\n                    public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {\r\n                        postSingle.setBackground(new BitmapDrawable(mContext.getResources(), bitmap));\r\n\r\n                    }\r\n\r\n                    @Override\r\n                    public void onBitmapFailed(final Drawable errorDrawable) {\r\n                        Log.d(\"TAG\", \"FAILED\");\r\n                    }\r\n\r\n                    @Override\r\n                    public void onPrepareLoad(final Drawable placeHolderDrawable) {\r\n                        Log.d(\"TAG\", \"Prepare Load\");\r\n                    }\r\n                });\r\n            }\r\n}\r\n"}}