Skip to content

Instantly share code, notes, and snippets.

@konk3r
Created March 20, 2016 22:17
Show Gist options
  • Save konk3r/01d8b0c6a2557cec8477 to your computer and use it in GitHub Desktop.
Save konk3r/01d8b0c6a2557cec8477 to your computer and use it in GitHub Desktop.
public void bind(Model model) {
if (model.id % 2 == 0) {
myLayout.setBackgroundResource(R.drawable.background_01); //works
textView.setTextColor(Color.BLACK);
} else {
myLayout.setBackgroundResource(R.drawable.background_02); //works
textView.setTextColor(Color.RED); // it's changing the color of the ones that are not "potato"
}
textView.setText(model.myText); //works
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment