Skip to content

Instantly share code, notes, and snippets.

@haristhohir
Created May 22, 2015 22:51
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 haristhohir/cda6454ab90e6b992744 to your computer and use it in GitHub Desktop.
Save haristhohir/cda6454ab90e6b992744 to your computer and use it in GitHub Desktop.
int viewType = getItemViewType(cursor.getPosition());
switch (viewType) {
case VIEW_TYPE_TODAY: {
// Get weather icon
viewHolder.iconView.setImageResource(Utility.getArtResourceForWeatherCondition(
cursor.getInt(ForecastFragment.COL_WEATHER_CONDITION_ID)));
break;
}
case VIEW_TYPE_FUTURE_DAY: {
// Get weather icon
viewHolder.iconView.setImageResource(Utility.getIconResourceForWeatherCondition(
cursor.getInt(ForecastFragment.COL_WEATHER_CONDITION_ID)));
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment