Skip to content

Instantly share code, notes, and snippets.

/.java Secret

Created May 5, 2016 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/27236ef76b0fdbbb9593a1c78b583280 to your computer and use it in GitHub Desktop.
Save anonymous/27236ef76b0fdbbb9593a1c78b583280 to your computer and use it in GitHub Desktop.
@Override
public void liked(LikeButton likeButton) {
QuestionData questionHolder = data.get(position);
Voting voting = new Voting(getAdapterPosition(), ViewpagerAdapter.this, questionId, questionHolder);
voting.mVotingInterface=new Voting.VotingInterface() {
@Override
public void updateRecycle() {
notifyDataSetChanged();
}
};
voting.realTimeUpVoting();
voting.onUpVote();
voting.mVotingInterface.updateRecycle();
}
@Override
public void unLiked(LikeButton likeButton) {
QuestionData questionHolder = data.get(position);
Voting voting = new Voting(getAdapterPosition(), ViewpagerAdapter.this, questionId, questionHolder);
voting.mVotingInterface=new Voting.VotingInterface() {
@Override
public void updateRecycle() {
notifyDataSetChanged();
}
};
voting.realTimeDownVoting();
voting.onDownVote();
voting.mVotingInterface.updateRecycle();
}
});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment