]> git.ktnx.net Git - mobile-ledger.git/commitdiff
whitespace
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 15 Aug 2020 10:08:00 +0000 (10:08 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 15 Aug 2020 12:48:13 +0000 (12:48 +0000)
14 files changed:
app/src/main/java/net/ktnx/mobileledger/App.java
app/src/main/java/net/ktnx/mobileledger/async/SendTransactionTask.java
app/src/main/java/net/ktnx/mobileledger/model/Currency.java
app/src/main/java/net/ktnx/mobileledger/model/Data.java
app/src/main/java/net/ktnx/mobileledger/model/LedgerTransaction.java
app/src/main/java/net/ktnx/mobileledger/ui/CrashReportDialogFragment.java
app/src/main/java/net/ktnx/mobileledger/ui/CurrencySelectorFragment.java
app/src/main/java/net/ktnx/mobileledger/ui/CurrencySelectorModel.java
app/src/main/java/net/ktnx/mobileledger/ui/HueRing.java
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemsAdapter.java
app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java
app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfilesRecyclerViewAdapter.java
app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListViewModel.java

index f0f7c013230f92913d82e6978e1da715f0420bee..724627971769db475e7007c799ed1ae81987edf6 100644 (file)
@@ -42,10 +42,14 @@ public class App extends Application {
     private MobileLedgerDatabase dbHelper;
     private boolean monthNamesPrepared = false;
     public static SQLiteDatabase getDatabase() {
-        if (instance == null) throw new RuntimeException("Application not created yet");
+        if (instance == null)
+            throw new RuntimeException("Application not created yet");
 
         return instance.getDB();
     }
+    public static void prepareMonthNames() {
+        instance.prepareMonthNames(false);
+    }
     @Override
     public void onCreate() {
         Logger.debug("flow", "App onCreate()");
@@ -63,10 +67,12 @@ public class App extends Application {
                         final String expectedHost = url.getHost();
                         if (requestingHost.equalsIgnoreCase(expectedHost))
                             return new PasswordAuthentication(p.getAuthUserName(),
-                                    p.getAuthPassword().toCharArray());
-                        else Log.w("http-auth",
-                                String.format("Requesting host [%s] differs from expected [%s]",
-                                        requestingHost, expectedHost));
+                                    p.getAuthPassword()
+                                     .toCharArray());
+                        else
+                            Log.w("http-auth",
+                                    String.format("Requesting host [%s] differs from expected [%s]",
+                                            requestingHost, expectedHost));
                     }
                     catch (MalformedURLException e) {
                         e.printStackTrace();
@@ -77,9 +83,6 @@ public class App extends Application {
             }
         });
     }
-    public static void prepareMonthNames() {
-        instance.prepareMonthNames(false);
-    }
     private void prepareMonthNames(boolean force) {
         if (force || monthNamesPrepared)
             return;
@@ -105,12 +108,11 @@ public class App extends Application {
         if (dbHelper == null)
             initDb();
 
-        final SQLiteDatabase db = dbHelper.getWritableDatabase();
-
-        return db;
+        return dbHelper.getWritableDatabase();
     }
     private synchronized void initDb() {
-        if (dbHelper != null) return;
+        if (dbHelper != null)
+            return;
 
         dbHelper = new MobileLedgerDatabase(this);
     }
index f67e1844f052157d47e92f9e695c181646c43f2e..f2ed99ff9e09d4170b538a2409341914eafab0cf 100644 (file)
@@ -64,7 +64,7 @@ public class SendTransactionTask extends AsyncTask<LedgerTransaction, Void, Void
     private String session;
     private LedgerTransaction transaction;
     private MobileLedgerProfile mProfile;
-    private boolean simulate = false;
+    private boolean simulate;
 
     public SendTransactionTask(TaskCallback callback, MobileLedgerProfile profile,
                                boolean simulate) {
index 596cdf1c493c50c5b308a5b3f63c717ece831b5b..6933930b6834494c5bccaf96fd3972f0b93864b5 100644 (file)
@@ -84,27 +84,6 @@ public class Currency {
         MobileLedgerProfile profile = Data.getProfile();
         return profile.loadCurrencyByName(name);
     }
-    public int getId() {
-        return id;
-    }
-    public String getName() {
-        return name;
-    }
-    public void setName(String name) {
-        this.name = name;
-    }
-    public Position getPosition() {
-        return position;
-    }
-    public void setPosition(Position position) {
-        this.position = position;
-    }
-    public boolean hasGap() {
-        return hasGap;
-    }
-    public void setHasGap(boolean hasGap) {
-        this.hasGap = hasGap;
-    }
     static public boolean equal(Currency left, Currency right) {
         if (left == null) {
             return right == null;
@@ -126,6 +105,27 @@ public class Currency {
                 return leftName.equals(right);
         }
     }
+    public int getId() {
+        return id;
+    }
+    public String getName() {
+        return name;
+    }
+    public void setName(String name) {
+        this.name = name;
+    }
+    public Position getPosition() {
+        return position;
+    }
+    public void setPosition(Position position) {
+        this.position = position;
+    }
+    public boolean hasGap() {
+        return hasGap;
+    }
+    public void setHasGap(boolean hasGap) {
+        this.hasGap = hasGap;
+    }
     public enum Position {
         before(-1), after(1), unknown(0), none(-2);
         private int value;
index 02ba81d454ad9acddbeadad301091df7a7c251d4..a379f2bce8adadbc68eefb25bd808f0d51950e8f 100644 (file)
@@ -60,6 +60,7 @@ public final class Data {
             new MutableLiveData<>();
     public static final MutableLiveData<Boolean> currencyGap = new MutableLiveData<>(true);
     public static final MutableLiveData<Locale> locale = new MutableLiveData<>(Locale.getDefault());
+    public static final MutableLiveData<Boolean> drawerOpen = new MutableLiveData<>(false);
     private static final MutableLiveData<MobileLedgerProfile> profile =
             new InertMutableLiveData<>();
     private static final AtomicInteger backgroundTaskCount = new AtomicInteger(0);
@@ -70,7 +71,6 @@ public final class Data {
     public static MobileLedgerProfile getProfile() {
         return Objects.requireNonNull(profile.getValue());
     }
-    public static final MutableLiveData<Boolean> drawerOpen = new MutableLiveData<>(false);
     public static void backgroundTaskStarted() {
         int cnt = backgroundTaskCount.incrementAndGet();
         debug("data",
index e31d1582c4cfe551b83d0aa6dc32f7654396cc7a..6a8234f28dc8d7145f8cd578db2353f8f5f41aad 100644 (file)
@@ -36,25 +36,21 @@ import java.util.Comparator;
 
 public class LedgerTransaction {
     private static final String DIGEST_TYPE = "SHA-256";
-    public final Comparator<LedgerTransactionAccount> comparator =
-            new Comparator<LedgerTransactionAccount>() {
-                @Override
-                public int compare(LedgerTransactionAccount o1, LedgerTransactionAccount o2) {
-                    int res = o1.getAccountName()
-                                .compareTo(o2.getAccountName());
-                    if (res != 0)
-                        return res;
-                    res = o1.getCurrency()
-                            .compareTo(o2.getCurrency());
-                    if (res != 0)
-                        return res;
-                    res = o1.getComment()
-                            .compareTo(o2.getComment());
-                    if (res != 0)
-                        return res;
-                    return Float.compare(o1.getAmount(), o2.getAmount());
-                }
-            };
+    public final Comparator<LedgerTransactionAccount> comparator = (o1, o2) -> {
+        int res = o1.getAccountName()
+                    .compareTo(o2.getAccountName());
+        if (res != 0)
+            return res;
+        res = o1.getCurrency()
+                .compareTo(o2.getCurrency());
+        if (res != 0)
+            return res;
+        res = o1.getComment()
+                .compareTo(o2.getComment());
+        if (res != 0)
+            return res;
+        return Float.compare(o1.getAmount(), o2.getAmount());
+    };
     private String profile;
     private Integer id;
     private SimpleDate date;
index 617a006c9f65dfea051a1dca347020b0be86aa3b..fcb53193680f8b6c1f7f545203e07755df22dca1 100644 (file)
@@ -22,14 +22,15 @@ import android.app.Dialog;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.os.Bundle;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.fragment.app.DialogFragment;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.ScrollView;
 import android.widget.TextView;
 
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.DialogFragment;
+
 import net.ktnx.mobileledger.R;
 import net.ktnx.mobileledger.utils.Globals;
 
index 9c527fe076e53b9d2c349cdfc59b14d60feaf823..4993df37e1a71a4c93cf0b7561c53314da8d5d3b 100644 (file)
@@ -112,7 +112,7 @@ public class CurrencySelectorFragment extends AppCompatDialogFragment
 
         model.currencies.setValue(new CopyOnWriteArrayList<>(profile.getCurrencies()));
         CurrencySelectorRecyclerViewAdapter adapter = new CurrencySelectorRecyclerViewAdapter();
-        model.currencies.observe(this, list -> adapter.submitList(list));
+        model.currencies.observe(this, adapter::submitList);
 
         recyclerView.setAdapter(adapter);
         adapter.setCurrencySelectedListener(this);
@@ -184,14 +184,12 @@ public class CurrencySelectorFragment extends AppCompatDialogFragment
 
         gap.setChecked(Data.currencyGap.getValue());
 
-        gap.setOnCheckedChangeListener((v, checked) -> {
-            Data.currencyGap.setValue(checked);
-        });
+        gap.setOnCheckedChangeListener((v, checked) -> Data.currencyGap.setValue(checked));
 
-        model.observePositionAndPaddingVisible(this, visible -> {
-            csd.findViewById(R.id.params_panel)
-               .setVisibility(visible ? View.VISIBLE : View.GONE);
-        });
+        model.observePositionAndPaddingVisible(this, visible -> csd.findViewById(R.id.params_panel)
+                                                                   .setVisibility(
+                                                                           visible ? View.VISIBLE
+                                                                                   : View.GONE));
 
         if ((savedInstanceState != null) ? savedInstanceState.getBoolean(ARG_SHOW_PARAMS,
                 DEFAULT_SHOW_PARAMS) : DEFAULT_SHOW_PARAMS)
index 58950244b70ce29d9ee8876bef118b4ca80872b0..89b787922730f575d298fe32551ab5b124d872dc 100644 (file)
@@ -39,7 +39,8 @@ public class CurrencySelectorModel extends ViewModel {
     public void hidePositionAndPadding() {
         positionAndPaddingVisible.postValue(false);
     }
-    public void observePositionAndPaddingVisible(LifecycleOwner activity, Observer<Boolean> observer) {
+    public void observePositionAndPaddingVisible(LifecycleOwner activity,
+                                                 Observer<Boolean> observer) {
         positionAndPaddingVisible.observe(activity, observer);
     }
     void setOnCurrencySelectedListener(OnCurrencySelectedListener listener) {
index c97741a9b1f4e98a4559c4b709a53f69b107d360..006cd4ba7c0480031cbeaa30dc1becae8b11552d 100644 (file)
@@ -28,10 +28,11 @@ import android.util.AttributeSet;
 import android.view.MotionEvent;
 import android.view.View;
 
+import androidx.annotation.Nullable;
+
 import net.ktnx.mobileledger.utils.Colors;
 import net.ktnx.mobileledger.utils.DimensionUtils;
 
-import androidx.annotation.Nullable;
 
 import static net.ktnx.mobileledger.utils.Logger.debug;
 
@@ -114,13 +115,16 @@ public class HueRing extends View {
         return hueDegrees;
     }
     public void setHue(int hueDegrees) {
-        if (hueDegrees == -1) hueDegrees = Colors.DEFAULT_HUE_DEG;
+        if (hueDegrees == -1)
+            hueDegrees = Colors.DEFAULT_HUE_DEG;
 
         if (hueDegrees != Colors.DEFAULT_HUE_DEG) {
             // round to 15 degrees
             int rem = hueDegrees % hueStepDegrees;
-            if (rem < (hueStepDegrees / 2)) hueDegrees -= rem;
-            else hueDegrees += hueStepDegrees - rem;
+            if (rem < (hueStepDegrees / 2))
+                hueDegrees -= rem;
+            else
+                hueDegrees += hueStepDegrees - rem;
         }
 
         this.hueDegrees = hueDegrees;
@@ -161,8 +165,8 @@ public class HueRing extends View {
 //        p.arcTo(-innerEdge, -innerEdge, innerEdge, innerEdge, -hueStepDegrees / 2f,
 //                hueStepDegrees, true);
 //        p.lineTo(outerEdge * cr, outerEdge * sr);
-        p.arcTo(-outerEdge, -outerEdge, outerEdge, outerEdge, hueStepDegrees / 2f,
-                -hueStepDegrees, false);
+        p.arcTo(-outerEdge, -outerEdge, outerEdge, outerEdge, hueStepDegrees / 2f, -hueStepDegrees,
+                false);
 //        p.close();
         canvas.save();
         canvas.translate(center, center);
@@ -224,7 +228,8 @@ public class HueRing extends View {
                 float angleRad = (float) Math.atan2(y, x);
                 // angleRad is [-𝜋; +𝜋]
                 float hue = (float) (angleRad / (2 * Math.PI));
-                if (hue < 0) hue += 1;
+                if (hue < 0)
+                    hue += 1;
                 debug("TMP",
                         String.format("x=%1.3f, y=%1.3f, angle=%1.3frad, hueDegrees=%1.3f", x, y,
                                 angleRad, hue));
@@ -235,7 +240,8 @@ public class HueRing extends View {
         return true;
     }
     public void setInitialHue(int initialHue) {
-        if (initialHue == -1) initialHue = Colors.DEFAULT_HUE_DEG;
+        if (initialHue == -1)
+            initialHue = Colors.DEFAULT_HUE_DEG;
         this.initialHueDegrees = initialHue;
         this.initialPaint.setColor(Colors.getPrimaryColorForHue(initialHue));
         invalidate();
index e311eb94ba450c9542ef9f0151328ddb2003853d..c274c455cef6845d5af8601f1c776ea92064d24c 100644 (file)
@@ -186,10 +186,9 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder
 
         decimalSeparator = String.valueOf(DecimalFormatSymbols.getInstance()
                                                               .getMonetaryDecimalSeparator());
-        localeObserver = locale -> {
-            decimalSeparator = String.valueOf(DecimalFormatSymbols.getInstance(locale)
-                                                                  .getMonetaryDecimalSeparator());
-        };
+        localeObserver = locale -> decimalSeparator = String.valueOf(
+                DecimalFormatSymbols.getInstance(locale)
+                                    .getMonetaryDecimalSeparator());
 
         decimalDot = ".";
 
@@ -719,7 +718,7 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder
     }
     @Override
     public void onDatePicked(int year, int month, int day) {
-        item.setDate(new SimpleDate(year, month+1, day));
+        item.setDate(new SimpleDate(year, month + 1, day));
         boolean focused = tvDescription.requestFocus();
         if (focused)
             Misc.showSoftKeyboard((NewTransactionActivity) tvAccount.getContext());
index d3e9d8f2a4f51549341c5c7df0e42cbd1315d0d0..4b3fa8e67a94675e5c0c51205ec34da245d3cb47 100644 (file)
@@ -247,11 +247,10 @@ class NewTransactionItemsAdapter extends RecyclerView.Adapter<NewTransactionItem
                 debug("description", broaderSql);
                 debug("description", description);
 
-                activity.runOnUiThread(() -> {
-                    Snackbar.make(recyclerView, R.string.ignoring_preferred_account,
-                            Snackbar.LENGTH_LONG)
-                            .show();
-                });
+                activity.runOnUiThread(
+                        () -> Snackbar.make(recyclerView, R.string.ignoring_preferred_account,
+                                Snackbar.LENGTH_LONG)
+                                      .show());
 
                 MLDB.queryInBackground(broaderSql, new String[]{description},
                         new MLDB.CallbackHelper() {
index 95faf5d1ade773559bbf51de734ad50a9bcddebb..ee01017e792eac8fc26d3fdbaf24a7797c34b347 100644 (file)
@@ -263,9 +263,7 @@ public class ProfileDetailFragment extends Fragment {
                 ((buttonView, isChecked) -> model.setPostingPermitted(isChecked)));
 
         Switch showCommentsByDefault = context.findViewById(R.id.profile_show_comments);
-        model.observeShowCommentsByDefault(viewLifecycleOwner, isChecked -> {
-            showCommentsByDefault.setChecked(isChecked);
-        });
+        model.observeShowCommentsByDefault(viewLifecycleOwner, showCommentsByDefault::setChecked);
         showCommentsByDefault.setOnCheckedChangeListener(
                 ((buttonView, isChecked) -> model.setShowCommentsByDefault(isChecked)));
 
@@ -288,9 +286,8 @@ public class ProfileDetailFragment extends Fragment {
                 v -> futureDatesText.setText(v.getText(getResources())));
 
         apiVersionText = context.findViewById(R.id.api_version_text);
-        model.observeApiVersion(viewLifecycleOwner, apiVer -> {
-            apiVersionText.setText(apiVer.getDescription(getResources()));
-        });
+        model.observeApiVersion(viewLifecycleOwner,
+                apiVer -> apiVersionText.setText(apiVer.getDescription(getResources())));
         context.findViewById(R.id.api_version_layout)
                .setOnClickListener(v -> {
                    MenuInflater mi = new MenuInflater(context);
index b2b5cb7fe18f9ee86867b041ad134c1625c6270e..ac90ce3237a5b24128e187d33118d8fcb2c103e8 100644 (file)
@@ -75,7 +75,8 @@ public class ProfilesRecyclerViewAdapter
                                   @NonNull RecyclerView.ViewHolder viewHolder,
                                   @NonNull RecyclerView.ViewHolder target) {
                 final ArrayList<MobileLedgerProfile> profiles = Data.profiles.getValue();
-                if (profiles == null) throw new AssertionError();
+                if (profiles == null)
+                    throw new AssertionError();
                 Collections.swap(profiles, viewHolder.getAdapterPosition(),
                         target.getAdapterPosition());
                 MobileLedgerProfile.storeProfilesOrder();
@@ -105,33 +106,40 @@ public class ProfilesRecyclerViewAdapter
     public void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView) {
         super.onAttachedToRecyclerView(recyclerView);
         this.recyclerView = recyclerView;
-        if (editingProfiles.getValue()) rearrangeHelper.attachToRecyclerView(recyclerView);
+        if (editingProfiles.getValue())
+            rearrangeHelper.attachToRecyclerView(recyclerView);
     }
     public void startEditingProfiles() {
-        if (editingProfiles.getValue()) return;
+        if (editingProfiles.getValue())
+            return;
         this.editingProfiles.setValue(true);
         rearrangeHelper.attachToRecyclerView(recyclerView);
     }
     public void stopEditingProfiles() {
-        if (!editingProfiles.getValue()) return;
+        if (!editingProfiles.getValue())
+            return;
         this.editingProfiles.setValue(false);
         rearrangeHelper.attachToRecyclerView(null);
     }
     public void flipEditingProfiles() {
-        if (editingProfiles.getValue()) stopEditingProfiles();
-        else startEditingProfiles();
+        if (editingProfiles.getValue())
+            stopEditingProfiles();
+        else
+            startEditingProfiles();
     }
     private void editProfile(View view, MobileLedgerProfile profile) {
         int index = Data.getProfileIndex(profile);
         Context context = view.getContext();
         Intent intent = new Intent(context, ProfileDetailActivity.class);
         intent.addFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION);
-        if (index != -1) intent.putExtra(ProfileDetailFragment.ARG_ITEM_ID, index);
+        if (index != -1)
+            intent.putExtra(ProfileDetailFragment.ARG_ITEM_ID, index);
 
         context.startActivity(intent);
     }
     private void onProfileRowClicked(View v) {
-        if (editingProfiles.getValue()) return;
+        if (editingProfiles.getValue())
+            return;
         MobileLedgerProfile profile = (MobileLedgerProfile) v.getTag();
         if (profile == null)
             throw new IllegalStateException("Profile row without associated profile");
@@ -144,7 +152,7 @@ public class ProfilesRecyclerViewAdapter
     @Override
     public ProfileListViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
         View view = LayoutInflater.from(parent.getContext())
-                .inflate(R.layout.profile_list_content, parent, false);
+                                  .inflate(R.layout.profile_list_content, parent, false);
         ProfileListViewHolder holder = new ProfileListViewHolder(view);
 
         holder.mRow.setOnClickListener(this::onProfileRowClicked);
@@ -153,7 +161,8 @@ public class ProfilesRecyclerViewAdapter
             onProfileRowClicked(row);
         });
         holder.mColorTag.setOnClickListener(v -> {
-            View row = (View) v.getParent().getParent();
+            View row = (View) v.getParent()
+                               .getParent();
             onProfileRowClicked(row);
         });
         holder.mTitle.setOnLongClickListener(v -> {
@@ -175,7 +184,8 @@ public class ProfilesRecyclerViewAdapter
     @Override
     public void onBindViewHolder(@NonNull final ProfileListViewHolder holder, int position) {
         final ArrayList<MobileLedgerProfile> profiles = Data.profiles.getValue();
-        if (profiles == null) throw new AssertionError();
+        if (profiles == null)
+            throw new AssertionError();
         final MobileLedgerProfile profile = profiles.get(position);
         final MobileLedgerProfile currentProfile = Data.getProfile();
         debug("profiles", String.format(Locale.ENGLISH, "pos %d: %s, current: %s", position,
@@ -183,9 +193,11 @@ public class ProfilesRecyclerViewAdapter
         holder.itemView.setTag(profile);
 
         int hue = profile.getThemeHue();
-        if (hue == -1) holder.mColorTag
-                .setBackgroundColor(Colors.getPrimaryColorForHue(Colors.DEFAULT_HUE_DEG));
-        else holder.mColorTag.setBackgroundColor(Colors.getPrimaryColorForHue(hue));
+        if (hue == -1)
+            holder.mColorTag.setBackgroundColor(
+                    Colors.getPrimaryColorForHue(Colors.DEFAULT_HUE_DEG));
+        else
+            holder.mColorTag.setBackgroundColor(Colors.getPrimaryColorForHue(hue));
 
         holder.mTitle.setText(profile.getName());
 //            holder.mSubTitle.setText(profile.getUrl());
@@ -193,15 +205,15 @@ public class ProfilesRecyclerViewAdapter
         holder.mEditButton.setOnClickListener(mOnClickListener);
 
         final boolean sameProfile = currentProfile.equals(profile);
-        holder.itemView
-                .setBackground(sameProfile ? new ColorDrawable(Colors.tableRowDarkBG) : null);
+        holder.itemView.setBackground(
+                sameProfile ? new ColorDrawable(Colors.tableRowDarkBG) : null);
         if (editingProfiles.getValue()) {
             boolean wasHidden = holder.mEditButton.getVisibility() == View.GONE;
             holder.mRearrangeHandle.setVisibility(View.VISIBLE);
             holder.mEditButton.setVisibility(View.VISIBLE);
             if (wasHidden && animationsEnabled) {
-                Animation a = AnimationUtils
-                        .loadAnimation(holder.mRearrangeHandle.getContext(), R.anim.fade_in);
+                Animation a = AnimationUtils.loadAnimation(holder.mRearrangeHandle.getContext(),
+                        R.anim.fade_in);
                 holder.mRearrangeHandle.startAnimation(a);
                 holder.mEditButton.startAnimation(a);
             }
@@ -211,8 +223,8 @@ public class ProfilesRecyclerViewAdapter
             holder.mRearrangeHandle.setVisibility(View.INVISIBLE);
             holder.mEditButton.setVisibility(View.GONE);
             if (wasShown && animationsEnabled) {
-                Animation a = AnimationUtils
-                        .loadAnimation(holder.mRearrangeHandle.getContext(), R.anim.fade_out);
+                Animation a = AnimationUtils.loadAnimation(holder.mRearrangeHandle.getContext(),
+                        R.anim.fade_out);
                 holder.mRearrangeHandle.startAnimation(a);
                 holder.mEditButton.startAnimation(a);
             }
index 16b9c2dc77ec6c9e48aba1793e036e27a9bf3e42..fd4dd8a9c4ac345fb055a8dce8ebe14c34ae7510 100644 (file)
@@ -19,20 +19,19 @@ package net.ktnx.mobileledger.ui.transaction_list;
 
 import android.os.AsyncTask;
 
+import androidx.lifecycle.ViewModel;
+
 import net.ktnx.mobileledger.async.UpdateTransactionsTask;
 import net.ktnx.mobileledger.model.Data;
 import net.ktnx.mobileledger.model.TransactionListItem;
 import net.ktnx.mobileledger.utils.LockHolder;
 import net.ktnx.mobileledger.utils.ObservableValue;
 
-import androidx.lifecycle.ViewModel;
-
 public class TransactionListViewModel extends ViewModel {
     public static ObservableValue<Boolean> updating = new ObservableValue<>();
     public static ObservableValue<String> updateError = new ObservableValue<>();
 
     public static void scheduleTransactionListReload() {
-
         String filter = Data.accountFilter.getValue();
         AsyncTask<String, Void, String> task = new UTT();
         task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, filter);