Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onBindViewHolder(final ViewHolderResults holder, int position) {
- final ResultItem currentResult = results.get(position);
- String currentItem = currentResult.getName();
- Set set = hmColor.entrySet();
- // Get an iterator
- Iterator i = set.iterator();
- // Display elements
- while(i.hasNext()) {
- Map.Entry me = (Map.Entry)i.next();
- if(me.getValue().equals(currentItem)) {
- Toast.makeText(MyApplication.getAppContext(), Boolean.toString(me.getValue().equals(currentResult.getName())), Toast.LENGTH_SHORT).show();
- holder.item.setBackgroundColor(ContextCompat.getColor(MyApplication.getAppContext(), R.color.checked));
- }
- else {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement