]> git.ktnx.net Git - mobile-ledger.git/commitdiff
whitespace
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 13 Jul 2019 05:54:51 +0000 (08:54 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 13 Jul 2019 05:57:58 +0000 (08:57 +0300)
app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java
app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfilesRecyclerViewAdapter.java
app/src/test/java/net/ktnx/mobileledger/json/ParsedQuantityTest.java

index c6dbc6a587c1799244b6656de63d95c4bba9cf5f..ebe97699176134361da2f7600034f5a8b0e89b92 100644 (file)
@@ -32,6 +32,11 @@ import android.widget.LinearLayout;
 import android.widget.Switch;
 import android.widget.TextView;
 
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentActivity;
+
 import com.google.android.material.appbar.CollapsingToolbarLayout;
 import com.google.android.material.floatingactionbutton.FloatingActionButton;
 import com.google.android.material.textfield.TextInputLayout;
@@ -51,11 +56,6 @@ import java.net.URL;
 import java.util.ArrayList;
 import java.util.Objects;
 
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.fragment.app.Fragment;
-import androidx.fragment.app.FragmentActivity;
-
 import static net.ktnx.mobileledger.utils.Logger.debug;
 
 /**
index bd5a3fec5996417aa4dd165f845f92537ba7be7d..6f533b01d3abffab5ef4d0a2e1afec955a278bea 100644 (file)
@@ -29,6 +29,13 @@ import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.constraintlayout.widget.ConstraintLayout;
+import androidx.lifecycle.MutableLiveData;
+import androidx.recyclerview.widget.ItemTouchHelper;
+import androidx.recyclerview.widget.RecyclerView;
+
 import net.ktnx.mobileledger.R;
 import net.ktnx.mobileledger.model.Data;
 import net.ktnx.mobileledger.model.MobileLedgerProfile;
@@ -40,23 +47,16 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Locale;
 
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.constraintlayout.widget.ConstraintLayout;
-import androidx.lifecycle.MutableLiveData;
-import androidx.recyclerview.widget.ItemTouchHelper;
-import androidx.recyclerview.widget.RecyclerView;
-
 import static net.ktnx.mobileledger.utils.Logger.debug;
 
 public class ProfilesRecyclerViewAdapter
         extends RecyclerView.Adapter<ProfilesRecyclerViewAdapter.ProfileListViewHolder> {
+    private static WeakReference<ProfilesRecyclerViewAdapter> instanceRef;
     private final View.OnClickListener mOnClickListener = view -> {
         MobileLedgerProfile profile = (MobileLedgerProfile) ((View) view.getParent()).getTag();
         editProfile(view, profile);
     };
     public MutableLiveData<Boolean> editingProfiles = new MutableLiveData<>(false);
-    private static WeakReference<ProfilesRecyclerViewAdapter> instanceRef;
     private RecyclerView recyclerView;
     private ItemTouchHelper rearrangeHelper;
     private boolean animationsEnabled = true;
@@ -88,7 +88,8 @@ public class ProfilesRecyclerViewAdapter
         };
         rearrangeHelper = new ItemTouchHelper(cb);
     }
-    public static @Nullable ProfilesRecyclerViewAdapter getInstance() {
+    public static @Nullable
+    ProfilesRecyclerViewAdapter getInstance() {
         return instanceRef.get();
     }
     public void setAnimationsEnabled(boolean animationsEnabled) {
index 7f5e2f8e8008dea746f7d8e35e7b0cd823997e9e..38e05f87e8bb0196e263ce5ab6e780c3f5397dda 100644 (file)
@@ -26,10 +26,10 @@ public class ParsedQuantityTest {
     public void fromString() {
         ParsedQuantity pq = new ParsedQuantity("-22");
         assertEquals(0, pq.getDecimalPlaces());
-        assertEquals( -22, pq.getDecimalMantissa());
+        assertEquals(-22, pq.getDecimalMantissa());
 
         pq = new ParsedQuantity("-123.45");
-        assertEquals( 2, pq.getDecimalPlaces());
-        assertEquals( -12345, pq.getDecimalMantissa());
+        assertEquals(2, pq.getDecimalPlaces());
+        assertEquals(-12345, pq.getDecimalMantissa());
     }
 }
\ No newline at end of file