Remove hardcoded and duplicate strings, use exoplayer ones

This commit is contained in:
Stypox 2020-09-22 16:46:09 +02:00
parent 5a1ec68f4a
commit 7016da5251
5 changed files with 95 additions and 86 deletions

View file

@ -209,7 +209,7 @@ public class NotificationSettingsFragment extends Fragment {
NotificationConstants.ACTION_ICONS[selectedAction]));
}
summary.setText(NotificationConstants.ACTION_SUMMARIES[selectedAction]);
summary.setText(NotificationConstants.getActionName(requireContext(), selectedAction));
}
void openActionChooserDialog() {
@ -225,8 +225,7 @@ public class NotificationSettingsFragment extends Fragment {
.create();
final View.OnClickListener radioButtonsClickListener = v -> {
final int id = ((RadioButton) v).getId();
selectedAction = NotificationConstants.SLOT_ALLOWED_ACTIONS[i][id];
selectedAction = NotificationConstants.SLOT_ALLOWED_ACTIONS[i][v.getId()];
updateInfo();
alertDialog.dismiss();
};
@ -253,7 +252,7 @@ public class NotificationSettingsFragment extends Fragment {
}
}
radioButton.setText(NotificationConstants.ACTION_SUMMARIES[action]);
radioButton.setText(NotificationConstants.getActionName(requireContext(), action));
radioButton.setChecked(action == selectedAction);
radioButton.setId(id);
radioButton.setLayoutParams(new RadioGroup.LayoutParams(