abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/SettingsActivity.java
AgeCommit message (Collapse)AuthorFilesLines
2024-01-20Light and dark themes for the launcher and settingsRetrogisusDEV1-13/+0
2023-08-16Migrate layouts preferencesJules Aguillon1-1/+6
The new `layouts` preference replaces three previous preferences: layout second_layout custom_layout Add a preference migration function, which first migration is to migrate layouts into the new preference. The migration must also be called from the SettingsActivity as it might use a different preference store due to the boot-aware preference copy.
2022-12-11Handle configuration change quicklyJules Aguillon1-11/+6
setInputView() was not called when the view was re-created through refresh_config(). Also, the refresh_config() function was not able to properly set the current layout. Now keep the default layout (_localeTextLayout) and the current non-text layout (if any, _currentSpecialLayout) separately to be able to refresh them later. setInputView() is called everytime the view is created instead of by onStartInputView() specifically. The setting activity now save the preferences to the protected storage in onStop() instead of listening for onSharedPreferenceChanged.
2022-12-11Fix keyboard not reacting to changed preferencesJules Aguillon1-1/+1
The callback might not be called if the "default" shared preferences is different from the shared preferences actually used. This is unexpected but seems to happen half of the time on Android 12. Since f1ce6ab, this callback is critical to update the keyboard. Restarting the application can no longer solve these issues.
2022-11-11Avoid crashing in direct-boot modeJules Aguillon1-2/+12
The settings activity can't open in direct-boot mode. The emoji pane opens without the "last used" data.
2022-11-11Direct-boot aware preferencesJules Aguillon1-0/+15
Store preferences in device protected storage, which is available before the device is unlocked. The keyboard was crashing when trying to access the encrypted preferences. The emoji pane uses a separate preferences file, the old data is lost. The SettingsActivity can't easily use the new preferences storage. Instead, it continues to use the "default" preferences store, which is copied back to the protected storage when needed.
2022-11-05Automatic day night theme in settings activityJules Aguillon1-0/+15
There seems to be no "DayNight" theme compatible with older version of android outside of the androidx library. Using 'Theme.DeviceDefault' which is a dark theme, even if it doesn't sounds like. Detect if a light theme should be used at activity creation.
2021-12-19Auto-format Java and XML filesJules Aguillon1-6/+6
Use xmllint. Re-indent Java files using spaces.
2015-08-08Start SettingsActivityjuloo1-0/+14