Merge "Set Active dream to not be clickable when active." into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
2f178cfdf3
@@ -105,13 +105,6 @@ public class DreamAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||||||
icon.setBounds(0, 0, iconSize, iconSize);
|
icon.setBounds(0, 0, iconSize, iconSize);
|
||||||
mTitleView.setCompoundDrawablesRelative(icon, null, null, null);
|
mTitleView.setCompoundDrawablesRelative(icon, null, null, null);
|
||||||
|
|
||||||
if (item.isActive()) {
|
|
||||||
mLastSelectedPos = position;
|
|
||||||
itemView.setSelected(true);
|
|
||||||
} else {
|
|
||||||
itemView.setSelected(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
mCustomizeButton.setOnClickListener(v -> item.onCustomizeClicked());
|
mCustomizeButton.setOnClickListener(v -> item.onCustomizeClicked());
|
||||||
mCustomizeButton.setVisibility(
|
mCustomizeButton.setVisibility(
|
||||||
item.allowCustomization() && mEnabled ? View.VISIBLE : View.GONE);
|
item.allowCustomization() && mEnabled ? View.VISIBLE : View.GONE);
|
||||||
@@ -125,6 +118,15 @@ public class DreamAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||||||
notifyItemChanged(position);
|
notifyItemChanged(position);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (item.isActive()) {
|
||||||
|
mLastSelectedPos = position;
|
||||||
|
itemView.setSelected(true);
|
||||||
|
itemView.setClickable(false);
|
||||||
|
} else {
|
||||||
|
itemView.setSelected(false);
|
||||||
|
itemView.setClickable(true);
|
||||||
|
}
|
||||||
|
|
||||||
setEnabledStateOnViews(itemView, mEnabled);
|
setEnabledStateOnViews(itemView, mEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user