import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.ParsePosition;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.ParsePosition;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicInteger;
import static net.ktnx.mobileledger.utils.Logger.debug;
import java.util.concurrent.atomic.AtomicInteger;
import static net.ktnx.mobileledger.utils.Logger.debug;
new MutableLiveData<>(false);
public static final MutableLiveData<RetrieveTransactionsTask.Progress> backgroundTaskProgress =
new MutableLiveData<>();
new MutableLiveData<>(false);
public static final MutableLiveData<RetrieveTransactionsTask.Progress> backgroundTaskProgress =
new MutableLiveData<>();
public static final MutableLiveData<Currency.Position> currencySymbolPosition =
new MutableLiveData<>();
public static final MutableLiveData<Boolean> currencyGap = new MutableLiveData<>(true);
public static final MutableLiveData<Currency.Position> currencySymbolPosition =
new MutableLiveData<>();
public static final MutableLiveData<Boolean> currencyGap = new MutableLiveData<>(true);
public static final MutableLiveData<String> lastTransactionsUpdateText =
new MutableLiveData<>();
public static final MutableLiveData<String> lastAccountsUpdateText = new MutableLiveData<>();
public static final MutableLiveData<String> lastTransactionsUpdateText =
new MutableLiveData<>();
public static final MutableLiveData<String> lastAccountsUpdateText = new MutableLiveData<>();
- private static final MutableLiveData<Profile> profile =
- new InertMutableLiveData<>();
+ public static final String decimalDot = ".";
+
+ private static final MutableLiveData<Profile> profile = new MutableLiveData<>();
private static final AtomicInteger backgroundTaskCount = new AtomicInteger(0);
private static final Locker profilesLocker = new Locker();
private static NumberFormat numberFormatter;
private static final AtomicInteger backgroundTaskCount = new AtomicInteger(0);
private static final Locker profilesLocker = new Locker();
private static NumberFormat numberFormatter;
NumberFormat newNumberFormatter = NumberFormat.getNumberInstance();
newNumberFormatter.setParseIntegerOnly(false);
newNumberFormatter.setGroupingUsed(true);
NumberFormat newNumberFormatter = NumberFormat.getNumberInstance();
newNumberFormatter.setParseIntegerOnly(false);
newNumberFormatter.setGroupingUsed(true);
newNumberFormatter.setMinimumIntegerDigits(1);
newNumberFormatter.setMinimumFractionDigits(2);
numberFormatter = newNumberFormatter;
newNumberFormatter.setMinimumIntegerDigits(1);
newNumberFormatter.setMinimumFractionDigits(2);
numberFormatter = newNumberFormatter;
public static String formatCurrency(float number) {
NumberFormat formatter = NumberFormat.getCurrencyInstance(locale.getValue());
return formatter.format(number);
}
public static String formatCurrency(float number) {
NumberFormat formatter = NumberFormat.getCurrencyInstance(locale.getValue());
return formatter.format(number);
}
profile.observe(lifecycleOwner, observer);
}
public static void removeProfileObservers(LifecycleOwner owner) {
profile.observe(lifecycleOwner, observer);
}
public static void removeProfileObservers(LifecycleOwner owner) {