Commit 84e20216 by tonihei Committed by Oliver Woodman

Do not allow deselection of radio button.

Instead just set the currently clicked item as override. If the already
selected button is clicked, the override is reset with the same value.

PiperOrigin-RevId: 236118429
parent 0bb123aa
......@@ -338,15 +338,8 @@ public class TrackSelectionView extends LinearLayout {
overrides.clear();
}
if (override == null || !adaptiveSelectionsEnabled) {
// Update override for current group.
if (((CheckedTextView) view).isChecked()) {
overrides.remove(groupIndex);
if (overrides.size() == 0) {
isDisabled = true;
}
} else {
overrides.put(groupIndex, new SelectionOverride(groupIndex, trackIndex));
}
// Set new override for current group.
overrides.put(groupIndex, new SelectionOverride(groupIndex, trackIndex));
} else {
// An existing override is being modified.
int overrideLength = override.length;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment