mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-22 23:57:42 +00:00
fix(android): Set image path
This commit is contained in:
parent
131180c050
commit
db728dfb8a
2 changed files with 8 additions and 6 deletions
|
|
@ -489,8 +489,7 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
|
||||
@Override
|
||||
public void onKeyboardLoaded(KeyboardType keyboardType) {
|
||||
// KeymanWeb initializes with a blank banner, so try to override with image
|
||||
KMManager.setBanner(keyboardType, KMManager.BannerType.IMAGE);
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -500,6 +499,9 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
|
||||
@Override
|
||||
public void onKeyboardShown() {
|
||||
// KMManager.init not working?
|
||||
KMManager.setBannerImage(KeyboardType.KEYBOARD_TYPE_INAPP, KMManager.KM_BANNER_THEME_GREEN);
|
||||
KMManager.setBanner(KeyboardType.KEYBOARD_TYPE_INAPP, KMManager.BannerType.IMAGE);
|
||||
resizeTextView(true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1436,9 +1436,9 @@ public final class KMManager {
|
|||
* @return status
|
||||
*/
|
||||
public static boolean setBanner(KeyboardType keyboard, BannerType bannerType) {
|
||||
if (keyboard == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
if (keyboard == KeyboardType.KEYBOARD_TYPE_INAPP && InAppKeyboard != null) {
|
||||
InAppKeyboard.setBanner(bannerType);
|
||||
} else if (keyboard == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
} else if (keyboard == KeyboardType.KEYBOARD_TYPE_SYSTEM && SystemKeyboard != null) {
|
||||
SystemKeyboard.setBanner(bannerType);
|
||||
} else {
|
||||
return false;
|
||||
|
|
@ -1453,9 +1453,9 @@ public final class KMManager {
|
|||
* @return
|
||||
*/
|
||||
public static boolean setBannerImage(KeyboardType keyboard, String path) {
|
||||
if (keyboard == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
if (keyboard == KeyboardType.KEYBOARD_TYPE_INAPP && InAppKeyboard != null) {
|
||||
InAppKeyboard.setBannerImage(path);
|
||||
} else if (keyboard == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
} else if (keyboard == KeyboardType.KEYBOARD_TYPE_SYSTEM && SystemKeyboard != null) {
|
||||
SystemKeyboard.setBannerImage(path);
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue