Search in sources :

Example 1 with DecimalDigitsInputFilter

use of com.samourai.wallet.util.DecimalDigitsInputFilter in project samourai-wallet-android by Samourai-Wallet.

the class BatchSendActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_batchsend);
    setTitle(R.string.options_batch);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    BatchSendActivity.this.getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
    data = new ArrayList<BatchSendUtil.BatchSend>();
    listView = (ListView) findViewById(R.id.list);
    adapter = new BatchAdapter();
    listView.setAdapter(adapter);
    AdapterView.OnItemClickListener listener = new AdapterView.OnItemClickListener() {

        public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {
            ;
        }
    };
    tvMaxPrompt = (TextView) findViewById(R.id.max_prompt);
    tvMax = (TextView) findViewById(R.id.max);
    try {
        balance = APIFactory.getInstance(BatchSendActivity.this).getXpubAmounts().get(HD_WalletFactory.getInstance(BatchSendActivity.this).get().getAccount(0).xpubstr());
    } catch (IOException ioe) {
        balance = 0L;
    } catch (MnemonicException.MnemonicLengthException mle) {
        balance = 0L;
    } catch (java.lang.NullPointerException npe) {
        balance = 0L;
    }
    displayBalance = balance;
    final NumberFormat nf = NumberFormat.getInstance(Locale.US);
    nf.setMaximumFractionDigits(8);
    nf.setMinimumFractionDigits(1);
    nf.setMinimumIntegerDigits(1);
    tvMax.setText(nf.format(displayBalance / 1e8) + " " + getDisplayUnits());
    tvMaxPrompt.setOnTouchListener(new View.OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            edAmountBTC.setText(nf.format(displayBalance / 1e8));
            return false;
        }
    });
    tvMax.setOnTouchListener(new View.OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            edAmountBTC.setText(nf.format(displayBalance / 1e8));
            return false;
        }
    });
    DecimalFormat format = (DecimalFormat) DecimalFormat.getInstance(Locale.US);
    DecimalFormatSymbols symbols = format.getDecimalFormatSymbols();
    defaultSeparator = Character.toString(symbols.getDecimalSeparator());
    edAddress = (EditText) findViewById(R.id.destination);
    textWatcherAddress = new TextWatcher() {

        public void afterTextChanged(Editable s) {
            if (_menu != null) {
                if (edAddress.getText().toString().length() > 0) {
                    _menu.findItem(R.id.action_scan_qr).setVisible(false);
                } else {
                    _menu.findItem(R.id.action_scan_qr).setVisible(true);
                }
            }
            validateSpend();
        }

        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
            ;
        }

        public void onTextChanged(CharSequence s, int start, int before, int count) {
            ;
        }
    };
    edAddress.addTextChangedListener(textWatcherAddress);
    edAddress.setOnTouchListener(new View.OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            // final int DRAWABLE_LEFT = 0;
            // final int DRAWABLE_TOP = 1;
            final int DRAWABLE_RIGHT = 2;
            if (event.getAction() == MotionEvent.ACTION_UP && event.getRawX() >= (edAddress.getRight() - edAddress.getCompoundDrawables()[DRAWABLE_RIGHT].getBounds().width())) {
                final List<String> entries = new ArrayList<String>();
                entries.addAll(BIP47Meta.getInstance().getSortedByLabels(false));
                final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(BatchSendActivity.this, android.R.layout.select_dialog_singlechoice);
                for (int i = 0; i < entries.size(); i++) {
                    arrayAdapter.add(BIP47Meta.getInstance().getDisplayLabel(entries.get(i)));
                }
                AlertDialog.Builder dlg = new AlertDialog.Builder(BatchSendActivity.this);
                dlg.setIcon(R.drawable.ic_launcher);
                dlg.setTitle(R.string.app_name);
                dlg.setAdapter(arrayAdapter, new DialogInterface.OnClickListener() {

                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        // Toast.makeText(BatchSendActivity.this, BIP47Meta.getInstance().getDisplayLabel(entries.get(which)), Toast.LENGTH_SHORT).show();
                        // Toast.makeText(BatchSendActivity.this, entries.get(which), Toast.LENGTH_SHORT).show();
                        processPCode(entries.get(which), null);
                    }
                });
                dlg.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {

                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss();
                    }
                });
                dlg.show();
                return true;
            }
            return false;
        }
    });
    edAmountBTC = (EditText) findViewById(R.id.amountBTC);
    edAmountBTC.setFilters(new InputFilter[] { new DecimalDigitsInputFilter(8, 8) });
    textWatcherBTC = new TextWatcher() {

        public void afterTextChanged(Editable s) {
            edAmountBTC.removeTextChangedListener(this);
            int max_len = 8;
            NumberFormat btcFormat = NumberFormat.getInstance(Locale.US);
            btcFormat.setMaximumFractionDigits(max_len + 1);
            btcFormat.setMinimumFractionDigits(0);
            double d = 0.0;
            try {
                d = NumberFormat.getInstance(Locale.US).parse(s.toString()).doubleValue();
                String s1 = btcFormat.format(d);
                if (s1.indexOf(defaultSeparator) != -1) {
                    String dec = s1.substring(s1.indexOf(defaultSeparator));
                    if (dec.length() > 0) {
                        dec = dec.substring(1);
                        if (dec.length() > max_len) {
                            edAmountBTC.setText(s1.substring(0, s1.length() - 1));
                            edAmountBTC.setSelection(edAmountBTC.getText().length());
                            s = edAmountBTC.getEditableText();
                        }
                    }
                }
            } catch (NumberFormatException nfe) {
                ;
            } catch (ParseException pe) {
                ;
            }
            if (d > 21000000.0) {
                edAmountBTC.setText("0");
                edAmountBTC.setSelection(edAmountBTC.getText().length());
                Toast.makeText(BatchSendActivity.this, R.string.invalid_amount, Toast.LENGTH_SHORT).show();
            }
            edAmountBTC.addTextChangedListener(this);
            validateSpend();
        }

        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
            ;
        }

        public void onTextChanged(CharSequence s, int start, int before, int count) {
            ;
        }
    };
    edAmountBTC.addTextChangedListener(textWatcherBTC);
    validateSpend();
    if (BatchSendUtil.getInstance().getSends().size() > 0) {
        List<BatchSendUtil.BatchSend> sends = BatchSendUtil.getInstance().getSends();
        for (BatchSendUtil.BatchSend send : sends) {
            data.add(send);
            displayBalance -= send.amount;
        }
        Handler handler = new Handler();
        handler.postDelayed(new Runnable() {

            @Override
            public void run() {
                String strAmount = nf.format(displayBalance / 1e8);
                tvMax.setText(strAmount + " " + getDisplayUnits());
                if (_menu != null) {
                    _menu.findItem(R.id.action_scan_qr).setVisible(true);
                    _menu.findItem(R.id.action_refresh).setVisible(true);
                    _menu.findItem(R.id.action_new).setVisible(false);
                    _menu.findItem(R.id.action_send).setVisible(true);
                }
            }
        }, 1000L);
    }
}
Also used : AlertDialog(android.app.AlertDialog) DialogInterface(android.content.DialogInterface) BatchSendUtil(com.samourai.wallet.util.BatchSendUtil) DecimalFormat(java.text.DecimalFormat) MnemonicException(org.bitcoinj.crypto.MnemonicException) TextWatcher(android.text.TextWatcher) Editable(android.text.Editable) List(java.util.List) ArrayList(java.util.ArrayList) DecimalDigitsInputFilter(com.samourai.wallet.util.DecimalDigitsInputFilter) DecimalFormatSymbols(java.text.DecimalFormatSymbols) Handler(android.os.Handler) IOException(java.io.IOException) ImageView(android.widget.ImageView) View(android.view.View) AdapterView(android.widget.AdapterView) TextView(android.widget.TextView) ListView(android.widget.ListView) MyTransactionOutPoint(com.samourai.wallet.send.MyTransactionOutPoint) Point(android.graphics.Point) MotionEvent(android.view.MotionEvent) AdapterView(android.widget.AdapterView) ParseException(java.text.ParseException) ArrayAdapter(android.widget.ArrayAdapter) NumberFormat(java.text.NumberFormat)

Example 2 with DecimalDigitsInputFilter

use of com.samourai.wallet.util.DecimalDigitsInputFilter in project samourai-wallet-android by Samourai-Wallet.

the class ReceiveActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_receive);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
    setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
    Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
    setTitle("");
    advanceOptionsContainer = findViewById(R.id.container_advance_options);
    tvAddress = findViewById(R.id.receive_address);
    tvPath = findViewById(R.id.path);
    addressTypesSpinner = findViewById(R.id.address_type_spinner);
    ivQR = findViewById(R.id.qr);
    advancedButton = findViewById(R.id.advance_button);
    edAmountBTC = findViewById(R.id.amountBTC);
    edAmountSAT = findViewById(R.id.amountSAT);
    populateSpinner();
    edAmountBTC.setFilters(new InputFilter[] { new DecimalDigitsInputFilter(8, 8) });
    edAmountBTC.addTextChangedListener(BTCWatcher);
    edAmountSAT.addTextChangedListener(satWatcher);
    Display display = (ReceiveActivity.this).getWindowManager().getDefaultDisplay();
    Point size = new Point();
    display.getSize(size);
    imgWidth = Math.max(size.x - 460, 150);
    ivQR.setMaxWidth(imgWidth);
    useSegwit = PrefsUtil.getInstance(ReceiveActivity.this).getValue(PrefsUtil.USE_SEGWIT, true);
    advancedButton.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            TransitionManager.beginDelayedTransition(advanceOptionsContainer, new AutoTransition());
            int visibility = advanceOptionsContainer.getVisibility() == View.VISIBLE ? View.INVISIBLE : View.VISIBLE;
            advanceOptionsContainer.setVisibility(visibility);
        }
    });
    idx84 = BIP84Util.getInstance(ReceiveActivity.this).getWallet().getAccount(0).getChain(0).getAddrIdx();
    idx49 = BIP49Util.getInstance(ReceiveActivity.this).getWallet().getAccount(0).getChain(0).getAddrIdx();
    try {
        idx44 = HD_WalletFactory.getInstance(ReceiveActivity.this).get().getAccount(0).getChain(0).getAddrIdx();
    } catch (IOException | MnemonicException.MnemonicLengthException e) {
        ;
    }
    addr84 = AddressFactory.getInstance(ReceiveActivity.this).getBIP84(AddressFactory.RECEIVE_CHAIN).getBech32AsString();
    addr49 = AddressFactory.getInstance(ReceiveActivity.this).getBIP49(AddressFactory.RECEIVE_CHAIN).getAddressAsString();
    addr44 = AddressFactory.getInstance(ReceiveActivity.this).get(AddressFactory.RECEIVE_CHAIN).getAddressString();
    if (useSegwit && isBIP84Selected()) {
        addr = addr84;
    } else if (useSegwit && !isBIP84Selected()) {
        addr = addr49;
    } else {
        addr = addr44;
    }
    addressTypesSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {

        @Override
        public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
            switch(position) {
                case 0:
                    {
                        addr = addr49;
                        break;
                    }
                case 1:
                    {
                        addr = addr84;
                        break;
                    }
                case 2:
                    {
                        addr = addr44;
                        break;
                    }
                default:
                    {
                        addr = addr49;
                    }
            }
            displayQRCode();
        }

        @Override
        public void onNothingSelected(AdapterView<?> parent) {
            ;
        }
    });
    if (useSegwit) {
        addressTypesSpinner.setSelection(1);
    } else {
        addressTypesSpinner.setSelection(2);
    }
    tvAddress.setOnTouchListener(new View.OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            new AlertDialog.Builder(ReceiveActivity.this).setTitle(R.string.app_name).setMessage(R.string.receive_address_to_clipboard).setCancelable(false).setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {

                public void onClick(DialogInterface dialog, int whichButton) {
                    android.content.ClipboardManager clipboard = (android.content.ClipboardManager) ReceiveActivity.this.getSystemService(android.content.Context.CLIPBOARD_SERVICE);
                    android.content.ClipData clip = null;
                    clip = android.content.ClipData.newPlainText("Receive address", addr);
                    clipboard.setPrimaryClip(clip);
                    Toast.makeText(ReceiveActivity.this, R.string.copied_to_clipboard, Toast.LENGTH_SHORT).show();
                }
            }).setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {

                public void onClick(DialogInterface dialog, int whichButton) {
                }
            }).show();
            return false;
        }
    });
    ivQR.setOnTouchListener(new OnSwipeTouchListener(ReceiveActivity.this) {

        @Override
        public void onSwipeLeft() {
            if (useSegwit && isBIP84Selected() && canRefresh84) {
                addr84 = AddressFactory.getInstance(ReceiveActivity.this).getBIP84(AddressFactory.RECEIVE_CHAIN).getBech32AsString();
                addr = addr84;
                canRefresh84 = false;
                _menu.findItem(R.id.action_refresh).setVisible(false);
                displayQRCode();
            } else if (useSegwit && !isBIP84Selected() && canRefresh49) {
                addr49 = AddressFactory.getInstance(ReceiveActivity.this).getBIP49(AddressFactory.RECEIVE_CHAIN).getAddressAsString();
                addr = addr49;
                canRefresh49 = false;
                _menu.findItem(R.id.action_refresh).setVisible(false);
                displayQRCode();
            } else if (!useSegwit && canRefresh44) {
                addr44 = AddressFactory.getInstance(ReceiveActivity.this).get(AddressFactory.RECEIVE_CHAIN).getAddressString();
                addr = addr44;
                canRefresh44 = false;
                _menu.findItem(R.id.action_refresh).setVisible(false);
                displayQRCode();
            } else {
                ;
            }
        }
    });
    DecimalFormat format = (DecimalFormat) DecimalFormat.getInstance(Locale.US);
    DecimalFormatSymbols symbols = format.getDecimalFormatSymbols();
    defaultSeparator = Character.toString(symbols.getDecimalSeparator());
    displayQRCode();
}
Also used : AlertDialog(android.app.AlertDialog) DialogInterface(android.content.DialogInterface) DecimalFormat(java.text.DecimalFormat) DecimalDigitsInputFilter(com.samourai.wallet.util.DecimalDigitsInputFilter) AutoTransition(android.support.transition.AutoTransition) DecimalFormatSymbols(java.text.DecimalFormatSymbols) Point(android.graphics.Point) IOException(java.io.IOException) ImageView(android.widget.ImageView) View(android.view.View) AdapterView(android.widget.AdapterView) TextView(android.widget.TextView) Point(android.graphics.Point) MotionEvent(android.view.MotionEvent) AdapterView(android.widget.AdapterView) Display(android.view.Display)

Example 3 with DecimalDigitsInputFilter

use of com.samourai.wallet.util.DecimalDigitsInputFilter in project samourai-wallet-android by Samourai-Wallet.

the class SendActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_send);
    setSupportActionBar(findViewById(R.id.toolbar_send));
    Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
    setTitle("");
    // CustomView for showing and hiding body of th UI
    sendTransactionDetailsView = findViewById(R.id.sendTransactionDetailsView);
    // ViewSwitcher Element for toolbar section of the UI.
    // we can switch between Form and review screen with this element
    amountViewSwitcher = findViewById(R.id.toolbar_view_switcher);
    // Input elements from toolbar section of the UI
    toAddressEditText = findViewById(R.id.edt_send_to);
    btcEditText = findViewById(R.id.amountBTC);
    satEditText = findViewById(R.id.amountSat);
    tvToAddress = findViewById(R.id.to_address_review);
    tvReviewSpendAmount = findViewById(R.id.send_review_amount);
    tvReviewSpendAmountInSats = findViewById(R.id.send_review_amount_in_sats);
    tvMaxAmount = findViewById(R.id.totalBTC);
    // view elements from review segment and transaction segment can be access through respective
    // methods which returns root viewGroup
    btnReview = sendTransactionDetailsView.getTransactionView().findViewById(R.id.review_button);
    cahootsSwitch = sendTransactionDetailsView.getTransactionView().findViewById(R.id.cahoots_switch);
    ricochetHopsSwitch = sendTransactionDetailsView.getTransactionView().findViewById(R.id.ricochet_hops_switch);
    ricochetTitle = sendTransactionDetailsView.getTransactionView().findViewById(R.id.ricochet_desc);
    ricochetDesc = sendTransactionDetailsView.getTransactionView().findViewById(R.id.ricochet_title);
    ricochetStaggeredDelivery = sendTransactionDetailsView.getTransactionView().findViewById(R.id.ricochet_staggered_option);
    ricochetStaggeredOptionGroup = sendTransactionDetailsView.getTransactionView().findViewById(R.id.ricochet_staggered_option_group);
    tvSelectedFeeRate = sendTransactionDetailsView.getTransactionReview().findViewById(R.id.selected_fee_rate);
    tvSelectedFeeRateLayman = sendTransactionDetailsView.getTransactionReview().findViewById(R.id.selected_fee_rate_in_layman);
    tvTotalFee = sendTransactionDetailsView.getTransactionReview().findViewById(R.id.total_fee);
    btnSend = sendTransactionDetailsView.getTransactionReview().findViewById(R.id.send_btn);
    feeSeekBar = sendTransactionDetailsView.getTransactionReview().findViewById(R.id.fee_seekbar);
    tvEstimatedBlockWait = sendTransactionDetailsView.getTransactionReview().findViewById(R.id.est_block_time);
    feeSeekBar = sendTransactionDetailsView.getTransactionReview().findViewById(R.id.fee_seekbar);
    cahootsGroup = sendTransactionDetailsView.findViewById(R.id.cohoots_options);
    cahootsStatusText = sendTransactionDetailsView.findViewById(R.id.cahoot_status_text);
    totalMinerFeeLayout = sendTransactionDetailsView.getTransactionReview().findViewById(R.id.total_miner_fee_group);
    cahootsNotice = sendTransactionDetailsView.findViewById(R.id.cahoots_not_enabled_notice);
    btcEditText.addTextChangedListener(BTCWatcher);
    btcEditText.setFilters(new InputFilter[] { new DecimalDigitsInputFilter(8, 8) });
    satEditText.addTextChangedListener(satWatcher);
    toAddressEditText.addTextChangedListener(AddressWatcher);
    btnReview.setOnClickListener(v -> review());
    btnSend.setOnClickListener(v -> initiateSpend());
    View.OnClickListener clipboardCopy = view -> {
        ClipboardManager cm = (ClipboardManager) this.getSystemService(Context.CLIPBOARD_SERVICE);
        ClipData clipData = android.content.ClipData.newPlainText("Miner fee", tvTotalFee.getText());
        if (cm != null) {
            cm.setPrimaryClip(clipData);
            Toast.makeText(this, getString(R.string.copied_to_clipboard), Toast.LENGTH_SHORT).show();
        }
    };
    tvTotalFee.setOnClickListener(clipboardCopy);
    tvSelectedFeeRate.setOnClickListener(clipboardCopy);
    SPEND_TYPE = SPEND_BOLTZMANN;
    saveChangeIndexes();
    setUpRicochet();
    setUpCahoots();
    setUpFee();
    setBalance();
    enableReviewButton(false);
    setUpBoltzman();
    validateSpend();
    checkDeepLinks();
    if (getIntent().getExtras().containsKey("preselected")) {
        preselectedUTXOs = PreSelectUtil.getInstance().getPreSelected(getIntent().getExtras().getString("preselected"));
        setBalance();
        if (preselectedUTXOs != null && preselectedUTXOs.size() > 0) {
            cahootsGroup.setVisibility(View.GONE);
            ricochetHopsSwitch.setVisibility(View.GONE);
            ricochetTitle.setVisibility(View.GONE);
            ricochetDesc.setVisibility(View.GONE);
        }
    } else {
        Disposable disposable = APIFactory.getInstance(getApplicationContext()).walletBalanceObserver.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(aLong -> {
            if (balance == aLong) {
                return;
            }
            setBalance();
        }, Throwable::printStackTrace);
        compositeDisposables.add(disposable);
        // Update fee
        Disposable feeDisposable = Observable.fromCallable(() -> APIFactory.getInstance(getApplicationContext()).getDynamicFees()).observeOn(AndroidSchedulers.mainThread()).subscribeOn(Schedulers.io()).subscribe(t -> {
            Log.i(TAG, "Fees : ".concat(t.toString()));
            setUpFee();
        }, Throwable::printStackTrace);
        compositeDisposables.add(feeDisposable);
        if (getIntent().getExtras() != null) {
            if (!getIntent().getExtras().containsKey("balance")) {
                return;
            }
            balance = getIntent().getExtras().getLong("balance");
        }
    }
}
Also used : MonetaryUtil(com.samourai.wallet.util.MonetaryUtil) BIP47Util(com.samourai.wallet.bip47.BIP47Util) Bundle(android.os.Bundle) Completable(io.reactivex.Completable) Uri(android.net.Uri) Group(android.support.constraint.Group) WhirlpoolMeta(com.samourai.wallet.whirlpool.WhirlpoolMeta) Cahoots(com.samourai.wallet.cahoots.Cahoots) JSONException(org.json.JSONException) Vector(java.util.Vector) UTXOSActivity(com.samourai.wallet.utxos.UTXOSActivity) Handler(android.os.Handler) Looper(android.os.Looper) Map(java.util.Map) ClipboardManager(android.content.ClipboardManager) BigInteger(java.math.BigInteger) Triple(org.apache.commons.lang3.tuple.Triple) Log(android.util.Log) ContextCompat(android.support.v4.content.ContextCompat) TxosLinkerOptionEnum(com.samourai.boltzmann.linker.TxosLinkerOptionEnum) AppUtil(com.samourai.wallet.util.AppUtil) TorManager(com.samourai.wallet.tor.TorManager) TransactionOutput(org.bitcoinj.core.TransactionOutput) BIP47Meta(com.samourai.wallet.bip47.BIP47Meta) Snackbar(android.support.design.widget.Snackbar) InputFilter(android.text.InputFilter) TextWatcher(android.text.TextWatcher) FormatsUtil(com.samourai.wallet.util.FormatsUtil) DecimalDigitsInputFilter(com.samourai.wallet.util.DecimalDigitsInputFilter) AddressFactory(com.samourai.wallet.util.AddressFactory) Editable(android.text.Editable) NumberFormat(java.text.NumberFormat) ArrayList(java.util.ArrayList) TxAnimUIActivity(com.samourai.wallet.TxAnimUIActivity) SeekBar(android.widget.SeekBar) SamouraiWallet(com.samourai.wallet.SamouraiWallet) Toast(android.widget.Toast) Menu(android.view.Menu) PaymentAddress(com.samourai.wallet.bip47.rpc.PaymentAddress) Observable(io.reactivex.Observable) RicochetMeta(com.samourai.wallet.ricochet.RicochetMeta) CharSequenceX(com.samourai.wallet.util.CharSequenceX) BoltzmannSettings(com.samourai.boltzmann.beans.BoltzmannSettings) Bech32Util(com.samourai.wallet.segwit.bech32.Bech32Util) IOException(java.io.IOException) TypedValue(android.util.TypedValue) Observer(io.reactivex.Observer) PaynymSelectModalFragment(com.samourai.wallet.fragments.PaynymSelectModalFragment) ConstraintLayout(android.support.constraint.ConstraintLayout) APIFactory(com.samourai.wallet.api.APIFactory) EditText(android.widget.EditText) HD_WalletFactory(com.samourai.wallet.hd.HD_WalletFactory) PrefsUtil(com.samourai.wallet.util.PrefsUtil) LinearLayout(android.widget.LinearLayout) Switch(android.widget.Switch) Transaction(org.bitcoinj.core.Transaction) URLDecoder(java.net.URLDecoder) Coin(org.bitcoinj.core.Coin) DecimalFormatSymbols(java.text.DecimalFormatSymbols) AndroidSchedulers(io.reactivex.android.schedulers.AndroidSchedulers) JSONObject(org.json.JSONObject) CheckBox(android.widget.CheckBox) TxProcessor(com.samourai.boltzmann.processor.TxProcessor) Locale(java.util.Locale) SamouraiActivity(com.samourai.wallet.SamouraiActivity) View(android.view.View) Button(android.widget.Button) ManualCahootsActivity(com.samourai.wallet.send.cahoots.ManualCahootsActivity) Schedulers(io.reactivex.schedulers.Schedulers) ParseException(java.text.ParseException) Splitter(com.google.common.base.Splitter) AccessFactory(com.samourai.wallet.access.AccessFactory) WebUtil(com.samourai.wallet.util.WebUtil) ViewSwitcher(android.widget.ViewSwitcher) PreSelectUtil(com.samourai.wallet.utxos.PreSelectUtil) SendAddressUtil(com.samourai.wallet.util.SendAddressUtil) ViewGroup(android.view.ViewGroup) BIP84Util(com.samourai.wallet.segwit.BIP84Util) AlertDialog(android.app.AlertDialog) Objects(java.util.Objects) List(java.util.List) CompositeDisposable(io.reactivex.disposables.CompositeDisposable) Disposable(io.reactivex.disposables.Disposable) TextView(android.widget.TextView) Script(org.bitcoinj.script.Script) Address(org.bitcoinj.core.Address) Txos(com.samourai.boltzmann.beans.Txos) UnsupportedEncodingException(java.io.UnsupportedEncodingException) Typeface(android.graphics.Typeface) Context(android.content.Context) Intent(android.content.Intent) HashMap(java.util.HashMap) PayloadUtil(com.samourai.wallet.payload.PayloadUtil) BIP49Util(com.samourai.wallet.segwit.BIP49Util) MnemonicException(org.bitcoinj.crypto.MnemonicException) CahootsUtil(com.samourai.wallet.cahoots.CahootsUtil) SendTransactionDetailsView(com.samourai.wallet.widgets.SendTransactionDetailsView) MenuItem(android.view.MenuItem) InputMethodManager(android.view.inputmethod.InputMethodManager) Hex(org.bouncycastle.util.encoders.Hex) ClipData(android.content.ClipData) SelectCahootsType(com.samourai.wallet.send.cahoots.SelectCahootsType) RicochetActivity(com.samourai.wallet.ricochet.RicochetActivity) DialogInterface(android.content.DialogInterface) UTXOCoin(com.samourai.wallet.utxos.models.UTXOCoin) SegwitAddress(com.samourai.wallet.segwit.SegwitAddress) CompoundButton(android.widget.CompoundButton) PayNymDetailsActivity(com.samourai.wallet.paynym.paynymDetails.PayNymDetailsActivity) DecimalFormat(java.text.DecimalFormat) R(com.samourai.wallet.R) PaymentCode(com.samourai.wallet.bip47.rpc.PaymentCode) TxProcessorResult(com.samourai.boltzmann.processor.TxProcessorResult) BatchSendActivity(com.samourai.wallet.BatchSendActivity) TimeUnit(java.util.concurrent.TimeUnit) CameraFragmentBottomSheet(com.samourai.wallet.fragments.CameraFragmentBottomSheet) Activity(android.app.Activity) Collections(java.util.Collections) JSONArray(org.json.JSONArray) ClipboardManager(android.content.ClipboardManager) CompositeDisposable(io.reactivex.disposables.CompositeDisposable) Disposable(io.reactivex.disposables.Disposable) DecimalDigitsInputFilter(com.samourai.wallet.util.DecimalDigitsInputFilter) View(android.view.View) TextView(android.widget.TextView) SendTransactionDetailsView(com.samourai.wallet.widgets.SendTransactionDetailsView) ClipData(android.content.ClipData)

Aggregations

AlertDialog (android.app.AlertDialog)3 DialogInterface (android.content.DialogInterface)3 View (android.view.View)3 TextView (android.widget.TextView)3 DecimalDigitsInputFilter (com.samourai.wallet.util.DecimalDigitsInputFilter)3 IOException (java.io.IOException)3 DecimalFormat (java.text.DecimalFormat)3 DecimalFormatSymbols (java.text.DecimalFormatSymbols)3 Point (android.graphics.Point)2 Handler (android.os.Handler)2 Editable (android.text.Editable)2 TextWatcher (android.text.TextWatcher)2 MotionEvent (android.view.MotionEvent)2 AdapterView (android.widget.AdapterView)2 Activity (android.app.Activity)1 ClipData (android.content.ClipData)1 ClipboardManager (android.content.ClipboardManager)1 Context (android.content.Context)1 Intent (android.content.Intent)1 Typeface (android.graphics.Typeface)1