i have a names list and i want to change the color to the rows depending on the letter the name starts with. This is what i\'m using to show the ListView:
ma
Your problem is that, you are sending as a parameter to the function setText, a number (int) and not a String. Hence, instead of:
setText
holder.text2.setText(words.indexOf(position));
Try this:
holder.text2.setText("" + words.indexOf(position));
Good Luck!