class BPIViewHolder extends RecyclerView.ViewHolder {

    public void bind(BPI item) {
        if (date != null) {
            date.setText(simpleDateFormat.format(item.getDate()));
        }
        SpannableStringBuilder closeText = new SpannableStringBuilder(String.format("$%.2f", item.getClose()));
        if (largeCloseTextSize) {
            // if large text, the price looks better with a small $
            closeText.setSpan(new RelativeSizeSpan(0.4f), 0, 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
        }
        close.setText(closeText);

        int changeTextColorRes = R.color.textColorSecondary;
        String changeText = "";
        String changeArrow = "";
        if (item.getChange() != null) {
            changeText = String.format("%.2f%%", item.getChange() * 100);
            if (item.getChange() > 0) {
                changeArrow = " ▲";
                changeTextColorRes = R.color.bpiChangeIncrease;
            } else if (item.getChange() < 0) {
                changeArrow = " ▼";
                changeTextColorRes = R.color.bpiChangeDecrease;
            }
        }
        change.setText(changeText + changeArrow);
        change.setTextColor(change.getResources().getColor(changeTextColorRes));
    }

    public  BPIViewHolder(View itemView, SimpleDateFormat simpleDateFormat);

}