import android.annotation.SuppressLint;
import android.graphics.Typeface;
-import android.os.Build;
import android.text.Editable;
import android.text.TextWatcher;
-import android.text.method.DigitsKeyListener;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
MLDB.hookAutocompletionAdapter(tvAccount.getContext(), tvAccount, MLDB.ACCOUNTS_TABLE,
"name", true, this, mProfile);
- // updated on locale changes by an observer below
decimalSeparator = String.valueOf(DecimalFormatSymbols.getInstance()
.getMonetaryDecimalSeparator());
+ localeObserver = locale -> {
+ decimalSeparator = String.valueOf(DecimalFormatSymbols.getInstance(locale)
+ .getMonetaryDecimalSeparator());
+ };
+
decimalDot = ".";
final TextWatcher tw = new TextWatcher() {
tvAmount.setImeOptions(EditorInfo.IME_ACTION_NEXT);
};
- localeObserver = locale -> {
- decimalSeparator = String.valueOf(DecimalFormatSymbols.getInstance(locale)
- .getMonetaryDecimalSeparator());
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
- tvAmount.setKeyListener(DigitsKeyListener.getInstance(locale, true, true));
- };
-
currencyObserver = currency -> {
setCurrency(currency);
adapter.checkTransactionSubmittable();