Closed ronniedroid closed 6 months ago
@naveensingh The commit history was becoming too cluttered and there was too much conflict. I hope this is fine.
@ronniedroid Great! No problem.
@naveensingh Sorry for the ping, just want to let you know that I will hold pushing the Arabic layout PR until this one is merged, so I don't have to do it twice :-).
One issue that I still have that I could not solve is.
When you deselect the current set keyboard language from the Selected keyboard languages
, the keyboard language switches to the first language in the set of SelectedLanguage
, but the subtitle of the keyboard language
section in the settings does not update to reflect this change immediately, one has to leave the settings and return to them to see the change.
@ronniedroid I haven't checked the whole code yet but you should be able to solve it using a callback parameter in SelectLanguagesToToggle
like this:
class SettingsLanguagesToToggle(..., val callback: (selectedLanguageCode) -> Unit) {
...
fun onConfirm() {
callback(getCurrentLanguage())
}
...
}
class SettingsActivity {
fun selectedKeyboardLanguaged() {
...
selectedKeyboardLanguagesHolder.setOnClickListener {
SettingsLanguagesToToggle(...) { selectedLanguageCode ->
// update text view using selectedLanguageCode
}
}
...
}
}
@ronniedroid I haven't checked the whole code yet but you should be able to solve it using a callback parameter in
SelectLanguagesToToggle
like this:
FIXED.
@naveensingh all done
I switched to a recyclerview for the languages selection and tested, everything is working just fine.
I'll check it out soon, thanks!
Just renamed the setting to Manage keyboard languages
and made some code style changes. I translated the manage_keyboard_languages
string to Arabic, please update it if the translation is wrong.
Thank you!
Added ability for the user to select only the languages they use.
Reopening a PR as it was a nightmare to rebase, so I closed the original PR and made a new branch.
Best.