]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfilesRecyclerViewAdapter.java
profile list: attach the touch helper only when editing profiles
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / profiles / ProfilesRecyclerViewAdapter.java
index 54386d9225279b4f7a09adca8dbcacc177f68acc..16bc932b8057d1352340cbc2a921343021a77510 100644 (file)
@@ -88,7 +88,7 @@ public class ProfilesRecyclerViewAdapter
     public void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView) {
         super.onAttachedToRecyclerView(recyclerView);
         this.recyclerView = recyclerView;
-        rearrangeHelper.attachToRecyclerView(recyclerView);
+        if (editingProfiles) rearrangeHelper.attachToRecyclerView(recyclerView);
     }
     public boolean editingProfiles() {
         return this.editingProfiles;
@@ -165,7 +165,7 @@ public class ProfilesRecyclerViewAdapter
         final boolean sameProfile = currentProfile.equals(profile);
         holder.itemView.setAlpha(sameProfile ? 1 : 0.5f);
         holder.itemView
-                .setBackground(sameProfile ? new ColorDrawable(Colors.tableRowLightBG) : null);
+                .setBackground(sameProfile ? new ColorDrawable(Colors.tableRowDarkBG) : null);
         if (editingProfiles) {
             holder.mRearrangeHandle.setVisibility(View.VISIBLE);
             holder.mEditButton.setVisibility(View.VISIBLE);