import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Locale;
import static net.ktnx.mobileledger.utils.Logger.debug;
public class ProfilesRecyclerViewAdapter
extends RecyclerView.Adapter<ProfilesRecyclerViewAdapter.ProfileListViewHolder> {
private static WeakReference<ProfilesRecyclerViewAdapter> instanceRef;
+ public final MutableLiveData<Boolean> editingProfiles = new MutableLiveData<>(false);
private final View.OnClickListener mOnClickListener = view -> {
MobileLedgerProfile profile = (MobileLedgerProfile) ((View) view.getParent()).getTag();
editProfile(view, profile);
};
- public final MutableLiveData<Boolean> editingProfiles = new MutableLiveData<>(false);
+ private final ItemTouchHelper rearrangeHelper;
private RecyclerView recyclerView;
- private ItemTouchHelper rearrangeHelper;
private boolean animationsEnabled = true;
public ProfilesRecyclerViewAdapter() {
instanceRef = new WeakReference<>(this);
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,
- profile.getUuid(), currentProfile.getUuid()));
+// debug("profiles", String.format(Locale.ENGLISH, "pos %d: %s, current: %s", position,
+// profile.getUuid(), currentProfile.getUuid()));
holder.itemView.setTag(profile);
int hue = profile.getThemeHue();