public void setTransactionType(TransactionType type) { mCalculatorOutputInfo.transactionType = type; mViewHolder.textViewIncomingOrOutgoing.setText(getTransactionTypeName(type)); int productNameTextColor = type == TransactionType.Incoming ? R.color.incoming_text_color : R.color.expense_text_color; mViewHolder.textViewIncomingOrOutgoing.setTextColor( getResources().getColor(productNameTextColor)); }
public CalculatorOutputInfo getOutputInfo() { mCalculatorOutputInfo.price = getPrice(); mCalculatorOutputInfo.quantity = getQuantityValue(); return mCalculatorOutputInfo; }
public void setTransactionDate(Date date) { mCalculatorOutputInfo.date = date; mViewHolder.textViewTransactionDate.setText( date != null ? DateTimeUtils.formatDateTime(date) : ""); mViewHolder.textViewTransactionDate.setVisibility(date != null ? View.VISIBLE : View.GONE); }
public void setCurrencyCode(String currencyCode) { mCalculatorOutputInfo.currencyCode = currencyCode; mViewHolder.textViewCurrencyCode.setText(currencyCode); }
public void setProduct(Product product) { mCalculatorOutputInfo.product = product; setProductName(product != null ? product.getName() : ""); }
public void setProductName(String name) { mCalculatorOutputInfo.productName = name; mViewHolder.textViewCalculatorProductName.setText(name); }
public void setLastPrice(BigDecimal price) { mIsLastPrice = true; mCalculatorOutputInfo.price = price; mViewHolder.textViewCalculatorPrice.setText(price.toString()); }
public void clear() { mCalculatorOutputInfo.price = new BigDecimal("0"); mViewHolder.textViewCalculatorPrice.setText("0"); }