Ejemplo n.º 1
0
 private void reset() {
   clearAddress(true);
   sendToAddressView.setVisibility(View.VISIBLE);
   sendToStaticAddressView.setVisibility(View.GONE);
   amountCalculatorLink.setPrimaryAmount(null);
   sendAmount = null;
   state = State.INPUT;
   addressError.setVisibility(View.GONE);
   amountError.setVisibility(View.GONE);
   amountWarning.setVisibility(View.GONE);
   updateView();
 }
Ejemplo n.º 2
0
  private void setAmountForEmptyWallet() {
    updateBalance();
    if (state != State.INPUT || pocket == null || lastBalance == null) return;

    if (lastBalance.isZero()) {
      String message = getResources().getString(R.string.amount_error_not_enough_money_plain);
      Toast.makeText(getActivity(), message, Toast.LENGTH_LONG).show();
    } else {
      amountCalculatorLink.setPrimaryAmount(lastBalance);
      validateAmount();
    }
  }
Ejemplo n.º 3
0
  public void reset() {
    // No-op if the view is not created
    if (getView() == null) return;

    clearAddress(true);
    hideTxMessage();
    sendToAddressView.setVisibility(View.VISIBLE);
    sendToStaticAddressView.setVisibility(View.GONE);
    amountCalculatorLink.setPrimaryAmount(null);
    sendAmount = null;
    state = State.INPUT;
    addressError.setVisibility(View.GONE);
    amountError.setVisibility(View.GONE);
    amountWarning.setVisibility(View.GONE);
    updateView();
  }