Advertisement
Guest User

Untitled

a guest
May 25th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. public void onBindViewHolder(final ViewHolderResults holder, int position) {
  2.  
  3. final ResultItem currentResult = results.get(position);
  4.  
  5. String currentItem = currentResult.getName();
  6. Set set = hmColor.entrySet();
  7. // Get an iterator
  8. Iterator i = set.iterator();
  9. // Display elements
  10. while(i.hasNext()) {
  11. Map.Entry me = (Map.Entry)i.next();
  12. if(me.getValue().equals(currentItem)) {
  13. Toast.makeText(MyApplication.getAppContext(), Boolean.toString(me.getValue().equals(currentResult.getName())), Toast.LENGTH_SHORT).show();
  14. holder.item.setBackgroundColor(ContextCompat.getColor(MyApplication.getAppContext(), R.color.checked));
  15. }
  16. else {
  17. }
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement