android - Changing a business object in an Adapter -
i'm building android app similar facebook (gets newsfeed stored in db rest api), , implementing reddit-like voting system, in every feed item has vote state (none, up, down) stored in db. when retrieve newsfeed json, set votestate vote state in json, display through newsfeed adapter. but if set votestate in newsfeed adapter value (based on onclicklistener), changed value not reach actual newsfeed. because every time scroll newsfeed, newsfeed adapter gets new instance of newsfeed, , doesn't care value changed. thus, i'm looking best way modify permanently newsfeed vote state newsfeed adapter (this can generalized variable assigned arraylist , displayed through arraylistadapter). if have suggestions, please feel free respond. thank :) edit : public class newsfeedadapter extends recyclerview.adapter<newsfeedadapter.viewholder> { private newsfeed newsfeed; private feeditem item; public newsfeedadapter(..., newsfeed newsfeed) { ...; this.newsfee...