mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-24 14:57:44 +00:00
Merge pull request #13702 from keymanapp/fix/android/broken-banner
fix(android): Fix system keyboard banner on reload
This commit is contained in:
commit
928087e467
3 changed files with 5 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue