diff --git a/ios/engine/KMEI/KeymanEngine/Classes/SettingsViewController.swift b/ios/engine/KMEI/KeymanEngine/Classes/SettingsViewController.swift index 543453bb0c..5378019369 100644 --- a/ios/engine/KMEI/KeymanEngine/Classes/SettingsViewController.swift +++ b/ios/engine/KMEI/KeymanEngine/Classes/SettingsViewController.swift @@ -53,7 +53,8 @@ open class SettingsViewController: UITableViewController { public init(/*storage: Storage*/) { // self.storage = storage super.init(nibName: nil, bundle: nil) - + os_log("init settings", log:KeymanEngineLogger.settings, type: .default) + itemsArray = [[String: String]]() itemsArray.append([ "title": NSLocalizedString("menu-installed-languages-title", bundle: engineBundle, comment: ""), @@ -79,6 +80,12 @@ open class SettingsViewController: UITableViewController { "reuseid": "spacebartext" ]) + itemsArray.append([ + "title": NSLocalizedString("menu-settings-adjust-keyboard-height", bundle: engineBundle, comment: ""), + "subtitle": "", + "reuseid": "adjustkeyboardheight" + ]) + if let _ = URL(string: UIApplication.openSettingsURLString) { itemsArray.append([ "title": NSLocalizedString("menu-settings-system-keyboard-menu", bundle: engineBundle, comment: ""), @@ -176,7 +183,7 @@ open class SettingsViewController: UITableViewController { enableReportingSwitch.rightAnchor.constraint(equalTo: cell.layoutMarginsGuide.rightAnchor).isActive = true enableReportingSwitch.centerYAnchor.constraint(equalTo: cell.layoutMarginsGuide.centerYAnchor).isActive = true - case "systemkeyboardsettings", "installfile", "forcederror", "spacebartext": + case "systemkeyboardsettings", "installfile", "forcederror", "spacebartext", "adjustkeyboardheight": break default: let message = "unknown cellIdentifier(\"\(cellIdentifier ?? "EMPTY")\")" @@ -233,6 +240,10 @@ open class SettingsViewController: UITableViewController { cell.detailTextLabel?.text = NSLocalizedString("menu-settings-spacebar-hint-"+Manager.shared.spacebarText.rawValue, bundle: engineBundle, comment: "") cell.detailTextLabel?.isEnabled = true break + case "adjustkeyboardheight": + cell.accessoryType = .disclosureIndicator + cell.detailTextLabel?.isEnabled = false + break case "showbanner", "showgetstarted": cell.detailTextLabel?.isEnabled = false default: @@ -280,6 +291,8 @@ open class SettingsViewController: UITableViewController { SentryManager.forceError() case "spacebartext": showSpacebarText() + case "adjustkeyboardheight": + showAdjustKeyboardHeight() default: break } @@ -429,4 +442,7 @@ open class SettingsViewController: UITableViewController { } } + func showAdjustKeyboardHeight() { + os_log("selected Adjust Keyboard Height", log:KeymanEngineLogger.settings, type: .default) + } } diff --git a/ios/engine/KMEI/KeymanEngine/en.lproj/Localizable.strings b/ios/engine/KMEI/KeymanEngine/en.lproj/Localizable.strings index db0966351e..917c868bb3 100644 --- a/ios/engine/KMEI/KeymanEngine/en.lproj/Localizable.strings +++ b/ios/engine/KMEI/KeymanEngine/en.lproj/Localizable.strings @@ -226,6 +226,9 @@ /* Text showing name of spacebar caption - language + keyboard */ "menu-settings-spacebar-item-languageKeyboard" = "Language and keyboard"; +/* Label for the "Adjust Keyboard Height" item on the main settings screen */ +"menu-settings-adjust-keyboard-height" = "Adjust Keyboard Height"; + /* Short text for notification: download failure for keyboard */ "notification-download-failure-keyboard" = "Keyboard download failed";