diff --git a/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/SCNApp.java b/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/SCNApp.java index 9199bf6..f327e08 100644 --- a/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/SCNApp.java +++ b/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/SCNApp.java @@ -98,5 +98,3 @@ public class SCNApp extends Application implements LifecycleObserver isBackground = false; } } - -//TODO TabLayout indicator does not correctly animate when directly clicking on tabs diff --git a/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/view/SettingsFragment.java b/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/view/SettingsFragment.java index 7437b4f..6e15076 100644 --- a/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/view/SettingsFragment.java +++ b/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/view/SettingsFragment.java @@ -150,9 +150,13 @@ public class SettingsFragment extends Fragment implements MusicPickerListener prefMsgHighLedColor_value = v.findViewById(R.id.prefMsgHighLedColor_value); prefMsgHighLedColor_container = v.findViewById(R.id.prefMsgHighLedColor_container); prefMsgHighEnableVibrations = v.findViewById(R.id.prefMsgHighEnableVibrations); - prefMsgHighForceVolume = v.findViewById(R.id.prefMsgHighForceVolume); - prefMsgHighVolume = v.findViewById(R.id.prefMsgHighVolume); - prefMsgHighVolumeTest = v.findViewById(R.id.btnHighVolumeTest); + prefMsgHighForceVolume = v.findViewById(R.id.prefMsgHighForceVolume); + prefMsgHighVolume = v.findViewById(R.id.prefMsgHighVolume); + prefMsgHighVolumeTest = v.findViewById(R.id.btnHighVolumeTest); + + ArrayAdapter plcsa = new ArrayAdapter<>(v.getContext(), android.R.layout.simple_spinner_item, SCNSettings.CHOOSABLE_CACHE_SIZES); + plcsa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + prefLocalCacheSize.setAdapter(plcsa); } private void updateUI() @@ -168,10 +172,7 @@ public class SettingsFragment extends Fragment implements MusicPickerListener prefUpgradeAccount_info.setVisibility(SCNSettings.inst().promode_local ? View.GONE : View.VISIBLE); prefUpgradeAccount_msg.setVisibility( SCNSettings.inst().promode_local ? View.VISIBLE : View.GONE ); - ArrayAdapter plcsa = new ArrayAdapter<>(c, android.R.layout.simple_spinner_item, SCNSettings.CHOOSABLE_CACHE_SIZES); - plcsa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); - prefLocalCacheSize.setAdapter(plcsa); - prefLocalCacheSize.setSelection(getCacheSizeIndex(s.LocalCacheSize)); + if (prefLocalCacheSize.getSelectedItemPosition() != getCacheSizeIndex(s.LocalCacheSize)) prefLocalCacheSize.setSelection(getCacheSizeIndex(s.LocalCacheSize)); if (prefMsgLowEnableSound.isChecked() != s.PriorityLow.EnableSound) prefMsgLowEnableSound.setChecked(s.PriorityLow.EnableSound); if (!prefMsgLowRingtone_value.getText().equals(s.PriorityLow.SoundName)) prefMsgLowRingtone_value.setText(s.PriorityLow.SoundName);