Source:
public void bindView(View view, Context context, Cursor cursor) { if (getItemViewType(cursor) == HEADER_VIEW_TYPE) { final HeaderViewHolder headerViewHolder = (HeaderViewHolder) view.getTag(); final String headerText = cursor.getString(cursor.getColumnIndex(ThemeModelTable.NAME)); final String countText = cursor.getString(cursor.getColumnIndex("count")); headerViewHolder.headerText.setText(headerText); headerViewHolder.countText.setText(countText); return; } String screenshotURL = cursor.getString(cursor.getColumnIndex(ThemeModelTable.SCREENSHOT_URL)); final ThemeViewHolder themeViewHolder = (ThemeViewHolder) view.getTag(); final String name = cursor.getString(cursor.getColumnIndex(ThemeModelTable.NAME)); final String themeId = cursor.getString(cursor.getColumnIndex(ThemeModelTable.THEME_ID)); final String currency = cursor.getString(cursor.getColumnIndex(ThemeModelTable.CURRENCY)); final float price = cursor.getFloat(cursor.getColumnIndex(ThemeModelTable.PRICE)); final boolean isPremium = price > 0.f; final boolean isCurrent = StringUtils.equals("true", cursor.getString(cursor.getColumnIndex(ThemeModelTable.ACTIVE))); themeViewHolder.nameView.setText(name); if (isPremium) { String priceText = currency + String.valueOf((int) price); themeViewHolder.priceView.setText(priceText); themeViewHolder.priceView.setVisibility(View.VISIBLE); } else { themeViewHolder.priceView.setVisibility(View.GONE); } if (!screenshotURL.startsWith("http")) { if (screenshotURL.startsWith(" screenshotURL = screenshotURL.substring(2); } screenshotURL = "https://" + screenshotURL; } configureImageView(themeViewHolder, screenshotURL, themeId, isCurrent); configureImageButton(context, themeViewHolder, themeId, isPremium, isCurrent); configureCardView(context, themeViewHolder, isCurrent); }

Target:
public void bindView(View view, Context context, Cursor cursor) { if (getItemViewType(cursor) == HEADER_VIEW_TYPE) { final HeaderViewHolder headerViewHolder = (HeaderViewHolder) view.getTag(); final String headerText = cursor.getString(cursor.getColumnIndex(ThemeModelTable.NAME)); final String countText = cursor.getString(cursor.getColumnIndex("count")); headerViewHolder.headerText.setText(headerText); headerViewHolder.countText.setText(countText); return; } String screenshotURL = cursor.getString(cursor.getColumnIndex(ThemeModelTable.SCREENSHOT_URL)); final ThemeViewHolder themeViewHolder = (ThemeViewHolder) view.getTag(); final String name = cursor.getString(cursor.getColumnIndex(ThemeModelTable.NAME)); final String themeId = cursor.getString(cursor.getColumnIndex(ThemeModelTable.THEME_ID)); final String currency = cursor.getString(cursor.getColumnIndex(ThemeModelTable.CURRENCY)); final float price = cursor.getFloat(cursor.getColumnIndex(ThemeModelTable.PRICE)); final boolean isPremium = price > 0.f; final boolean isCurrent = StringUtils.equals("true", cursor.getString(cursor.getColumnIndex(ThemeModelTable.ACTIVE))); themeViewHolder.nameView.setText(name); if (isPremium) { String priceText = currency + String.valueOf((int) price); themeViewHolder.priceView.setText(priceText); themeViewHolder.priceView.setVisibility(View.VISIBLE); } else { themeViewHolder.priceView.setVisibility(View.GONE); } if (!screenshotURL.startsWith(ThemeWebActivity.THEME_HTTP_PREFIX)) { if (screenshotURL.startsWith(" screenshotURL = screenshotURL.substring(2); } screenshotURL = ThemeWebActivity.THEME_HTTPS_PROTOCOL + screenshotURL; } configureImageView(themeViewHolder, screenshotURL, themeId, isCurrent); configureImageButton(context, themeViewHolder, themeId, isPremium, isCurrent); configureCardView(context, themeViewHolder, isCurrent); }