private void fillData(Product product) { int wheelimpact = (int) (product.getImpact() * 100 * 3.6); Log.i(getClass().getName(), String.valueOf(wheelimpact)); progressWheel.setProgress(wheelimpact); if (wheelimpact > 240) { progressWheel.setBarColor(getResources().getColor(R.color.bar_red)); } else if (wheelimpact > 120) { progressWheel.setBarColor(getResources().getColor(R.color.bar_yellow)); } else { progressWheel.setBarColor(getResources().getColor(R.color.bar_green)); } progressText.setText("" + (int) (wheelimpact / 3.6)); productTitle.setText(product.getName()); companyName.setText(product.getCompany()); description.setText(product.getDescription()); if (product.getDistrict() != null) { location.setText( product.getDistrict() + ", " + product.getCity() + ", " + product.getCountry()); } else { location.setText(product.getCity() + ", " + product.getCountry()); } }