From: Damyan Ivanov Date: Sat, 13 Jul 2019 05:54:51 +0000 (+0300) Subject: whitespace X-Git-Tag: v0.11.0~121 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=df9ebf3fc3ca1730afbdc5e6de248e51cc41ba80;p=mobile-ledger.git whitespace --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java index c6dbc6a5..ebe97699 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java @@ -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; /** diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfilesRecyclerViewAdapter.java b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfilesRecyclerViewAdapter.java index bd5a3fec..6f533b01 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfilesRecyclerViewAdapter.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfilesRecyclerViewAdapter.java @@ -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 { + private static WeakReference instanceRef; private final View.OnClickListener mOnClickListener = view -> { MobileLedgerProfile profile = (MobileLedgerProfile) ((View) view.getParent()).getTag(); editProfile(view, profile); }; public MutableLiveData editingProfiles = new MutableLiveData<>(false); - private static WeakReference 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) { diff --git a/app/src/test/java/net/ktnx/mobileledger/json/ParsedQuantityTest.java b/app/src/test/java/net/ktnx/mobileledger/json/ParsedQuantityTest.java index 7f5e2f8e..38e05f87 100644 --- a/app/src/test/java/net/ktnx/mobileledger/json/ParsedQuantityTest.java +++ b/app/src/test/java/net/ktnx/mobileledger/json/ParsedQuantityTest.java @@ -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