mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-19 14:17:40 +00:00
docs(android): document control flag for system keyboard picker and task
This commit is contained in:
parent
bc2eeb62d0
commit
4a73bc3ffc
3 changed files with 83 additions and 0 deletions
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: KMManager.closeParentAppOnShowKeyboardPicker()
|
||||
---
|
||||
|
||||
## Summary
|
||||
The **closeParentAppOnShowKeyboardPicker()** method restores the default behavior of the keyboard picker menu closing the parent app.
|
||||
|
||||
## Syntax
|
||||
|
||||
```javascript
|
||||
KMManager.closeParentAppOnShowKeyboardPicker()
|
||||
```
|
||||
|
||||
## Description
|
||||
Normally, launching the KeyboardPickerActivity from a system keyboard closes the parent app.
|
||||
|
||||
(The keyboard picker becomes the root of the activity stack)
|
||||
|
||||
Calling this function restores this default behavior.
|
||||
|
||||
## Examples
|
||||
|
||||
### Example: Using `closeParentAppOnShowKeyboardPicker()`
|
||||
|
||||
The following script illustrates the use of `closeParentAppOnShowKeyboardPicker()`:
|
||||
```java
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
KMManager.onResume();
|
||||
KMManager.hideSystemKeyboard();
|
||||
|
||||
// Reset keyboard picker Activity Task flag
|
||||
KMManager.closeParentAppOnShowKeyboardPicker();
|
||||
```
|
||||
|
||||
## See also
|
||||
* [dontCloseParentAppOnShowKeyboardPicker()](dontCloseParentAppOnShowKeyboardPicker)
|
||||
* [showKeyboardPicker()](showKeyboardPicker)
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
title: KMManager.dontCloseParentAppOnShowKeyboardPicker()
|
||||
---
|
||||
|
||||
## Summary
|
||||
The **dontCloseParentAppOnShowKeyboardPicker()** method disables the keyboard picker task flag so keyboard picker doesn't dismiss the parent app.
|
||||
|
||||
## Syntax
|
||||
|
||||
```javascript
|
||||
KMManager.dontCloseParentAppOnShowKeyboardPicker()
|
||||
```
|
||||
|
||||
## Description
|
||||
Normally, launching the KeyboardPickerActivity from a system keyboard closes the parent app.
|
||||
|
||||
(The keyboard picker becomes the root of the activity stack)
|
||||
|
||||
Calling this function keeps the parent app running in the background.
|
||||
|
||||
## Examples
|
||||
|
||||
### Example: Using `dontCloseParentAppOnShowKeyboardPicker()`
|
||||
|
||||
The following script illustrates the use of `dontCloseParentAppOnShowKeyboardPicker()`:
|
||||
```java
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// When using Keyman system keyboard within the Keyman app,
|
||||
// disable keyboard picker task flag so keyboard picker doesn't dismiss Keyman app
|
||||
KMManager.dontCloseParentAppOnShowKeyboardPicker();
|
||||
```
|
||||
|
||||
## See also
|
||||
* [closeParentAppOnShowKeyboardPicker()](closeParentAppOnShowKeyboardPicker)
|
||||
* [showKeyboardPicker()](showKeyboardPicker)
|
||||
|
|
@ -50,6 +50,9 @@ The KMManager is the core class which provides most of the methods and constants
|
|||
[`canRemoveKeyboard()`](canRemoveKeyboard)
|
||||
: returns whether removing a keyboard is enabled, like in the keyboard picker menu
|
||||
|
||||
[`closeParentAppOnShowKeyboardPicker()`](closeParentAppOnShowKeyboardPicker)
|
||||
: restores keyboard picker task flag so keyboard picker dismisses the parent app
|
||||
|
||||
[`copyHTMLBannerAssets()`](copyHTMLBannerAssets)
|
||||
: copies a folder of HTML banner assets so it's available for your keyboard app's resources
|
||||
|
||||
|
|
@ -59,6 +62,9 @@ The KMManager is the core class which provides most of the methods and constants
|
|||
[`deregisterLexicalModel()`](deregisterLexicalModel)
|
||||
: deregisters the specified lexical model from the LMLayer so it isn't used
|
||||
|
||||
[`dontCloseParentAppOnShowKeyboardPicker()`](dontCloseParentAppOnShowKeyboardPicker)
|
||||
: disables keyboard picker task flag so keyboard picker doesn't dismiss the parent app
|
||||
|
||||
[`executeHardwareKeystroke()`](executeHardwareKeystroke)
|
||||
: process the keystroke generated from a physical keyboard
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue