String currName = String.valueOf(tvNewCurrName.getText());
if (!currName.isEmpty()) {
- List<Currency> list = new ArrayList<>( model.currencies.getValue());
+ List<Currency> list = new ArrayList<>(model.currencies.getValue());
// FIXME hardcoded position and gap setting
list.add(new Currency(profile, String.valueOf(tvNewCurrName.getText()),
Currency.Position.after, false));
@Override
public void onCurrencyLongClick(Currency item) {
ArrayList<Currency> list = new ArrayList<>(model.currencies.getValue());
- App.getDatabase().execSQL("delete from currencies where id=?", new Object[]{item.getId()});
+ App.getDatabase()
+ .execSQL("delete from currencies where id=?", new Object[]{item.getId()});
list.remove(item);
model.currencies.setValue(list);
}
if ((items.size() > 2) && (emptyItems.size() == 1)) {
List<Item> currItems = itemsForCurrency.getList(currName);
- if (currItems.size() == 1){
+ if (currItems.size() == 1) {
Item item = emptyItems.get(0);
removeRow(item, adapter);
}