Skip to content

Commit

Permalink
Merge pull request #35 from SonamChugh13/emeka-okechukwu
Browse files Browse the repository at this point in the history
Remove commented out code
  • Loading branch information
emeka-okechukwu authored Apr 27, 2024
2 parents f38a23d + d43553b commit 01ca9a2
Showing 1 changed file with 0 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
import de.dennisguse.opentracks.settings.skiProfile.SkiProfileWaxingFragment;

public class SkiProfileSettingsFragment extends PreferenceFragmentCompat {

// private final SharedPreferences.OnSharedPreferenceChangeListener sharedPreferenceChangeListener = (sharedPreferences, key) -> {
// if (PreferencesUtils.isKey(R.string.night_mode_key, key)) {
// getActivity().runOnUiThread(PreferencesUtils::applyNightMode);
// }
// };

@Override
public void onCreatePreferences(@Nullable Bundle savedInstanceState, @Nullable String rootKey) {
addPreferencesFromResource(R.xml.settings_ski_profile);
Expand Down Expand Up @@ -49,74 +42,4 @@ public void onCreatePreferences(@Nullable Bundle savedInstanceState, @Nullable S
return true;
});
}


// @Override
// public void onStart() {
// super.onStart();
// ((SettingsActivity) getActivity()).getSupportActionBar().setTitle(R.string.settings_ski_profile_title);
// }
//
// @Override
// public void onResume() {
// super.onResume();
//
// EditTextPreference nameInput = findPreference(getString(R.string.settings_ski_profile_name_key));
// nameInput.setDialogTitle(getString(R.string.settings_ski_profile_name_dialog_title));
// nameInput.setOnBindEditTextListener(editText -> {
// editText.setSingleLine(true);
// editText.selectAll(); // select all text
// int maxNameLength = 20;
// editText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(maxNameLength)});
// });
//
//
// EditTextPreference phoneInput = findPreference(getString(R.string.settings_ski_profile_phone_key));
// phoneInput.setDialogTitle(getString(R.string.settings_ski_profile_phone_dialog_title));
// phoneInput.setOnBindEditTextListener(editText -> {
// editText.setSingleLine(true);
// editText.selectAll(); // select all text
// InputFilter inputFilter = (source, start, end, dest, dstart, dend) -> {
// if (TextUtils.isDigitsOnly(source)) {
// if (dest.length() + source.length() <= 10) {
// return null; // Accept the input
// }
// }
// return ""; // Reject the input
// };
// editText.setFilters(new InputFilter[]{inputFilter});
// editText.addTextChangedListener(new TextWatcher() {
// @Override
// public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
//
// @Override
// public void onTextChanged(CharSequence s, int start, int before, int count) {}
//
// @Override
// public void afterTextChanged(Editable s) {
// if (s.length() < 10) {
// editText.setError(getString(R.string.settings_ski_profile_phone_error)); // Set error message
// } else {
// editText.setError(null);
// }
// }
// });
// });
// EditTextPreference countryInput = findPreference("Country");
// countryInput.setDialogTitle("Country");
//
// EditTextPreference provinceInput = findPreference("Province");
// provinceInput.setDialogTitle("Province");
//
// ListPreference ski_type = findPreference("ski_type");
// ski_type.setDialogTitle("Type of Skiing");
//
// PreferencesUtils.registerOnSharedPreferenceChangeListener(sharedPreferenceChangeListener);
// }
//
// @Override
// public void onPause() {
// super.onPause();
// PreferencesUtils.unregisterOnSharedPreferenceChangeListener(sharedPreferenceChangeListener);
// }
}

0 comments on commit 01ca9a2

Please sign in to comment.