diff --git a/android/KMAPro/kMAPro/src/main/java/com/keyman/android/SystemKeyboard.java b/android/KMAPro/kMAPro/src/main/java/com/keyman/android/SystemKeyboard.java index 023195d1c4..e6016202a0 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/keyman/android/SystemKeyboard.java +++ b/android/KMAPro/kMAPro/src/main/java/com/keyman/android/SystemKeyboard.java @@ -110,9 +110,6 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven @Override public void onInitializeInterface() { super.onInitializeInterface(); - - // KeymanWeb reloaded, so we have to pass the banner again - BannerController.setHTMLBanner(this, KeyboardType.KEYBOARD_TYPE_SYSTEM); } /** @@ -272,7 +269,8 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven @Override public void onKeyboardShown() { - // Do nothing + // Refresh banner theme + BannerController.setHTMLBanner(this, KeyboardType.KEYBOARD_TYPE_SYSTEM); } @Override diff --git a/android/docs/engine/KMManager/setHTMLBanner.md b/android/docs/engine/KMManager/setHTMLBanner.md index 5fcc2c7003..a13fe9da35 100644 --- a/android/docs/engine/KMManager/setHTMLBanner.md +++ b/android/docs/engine/KMManager/setHTMLBanner.md @@ -28,7 +28,7 @@ Use this method to specify the HTML content to display in the banner to theme yo If the banner theme references assets (like .svg or .css files), ensure you've also called [copyHTMLBannerAssets()](copyHTMLBannerAssets). -Note: The HTML banner needs to be updated whenever the keyboard is reloaded, so call this in `SystemKeyboard.onInitializeInterface(()`. +Note: The HTML banner needs to be updated whenever the keyboard is reloaded, so call this in `SystemKeyboard.onKeyboardShown()`. ## Examples diff --git a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/SystemKeyboard.java b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/SystemKeyboard.java index 499e0d498b..f991720420 100644 --- a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/SystemKeyboard.java +++ b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/SystemKeyboard.java @@ -85,9 +85,6 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven @Override public void onInitializeInterface() { super.onInitializeInterface(); - - // KeymanWeb reloaded, so we have to pass the banner again - BannerController.setHTMLBanner(this, KeyboardType.KEYBOARD_TYPE_SYSTEM); } /** Called by the framework when your view for creating input needs to @@ -231,7 +228,8 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven @Override public void onKeyboardShown() { - // Handle Keyman keyboard shown event here if needed + // Refresh banner theme + BannerController.setHTMLBanner(this, KeyboardType.KEYBOARD_TYPE_SYSTEM); } @Override