Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
  public CalculatorOutputInfo getOutputInfo() {
    mCalculatorOutputInfo.price = getPrice();
    mCalculatorOutputInfo.quantity = getQuantityValue();

    return mCalculatorOutputInfo;
  }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
 public void setCurrencyCode(String currencyCode) {
   mCalculatorOutputInfo.currencyCode = currencyCode;
   mViewHolder.textViewCurrencyCode.setText(currencyCode);
 }
Ejemplo n.º 5
0
 public void setProduct(Product product) {
   mCalculatorOutputInfo.product = product;
   setProductName(product != null ? product.getName() : "");
 }
Ejemplo n.º 6
0
 public void setProductName(String name) {
   mCalculatorOutputInfo.productName = name;
   mViewHolder.textViewCalculatorProductName.setText(name);
 }
Ejemplo n.º 7
0
 public void setLastPrice(BigDecimal price) {
   mIsLastPrice = true;
   mCalculatorOutputInfo.price = price;
   mViewHolder.textViewCalculatorPrice.setText(price.toString());
 }
Ejemplo n.º 8
0
 public void clear() {
   mCalculatorOutputInfo.price = new BigDecimal("0");
   mViewHolder.textViewCalculatorPrice.setText("0");
 }