Skip to content

Latest commit

 

History

History
399 lines (354 loc) · 16.2 KB

Glossary.md

File metadata and controls

399 lines (354 loc) · 16.2 KB

Glossary

There are several vocabularies that you have to know for this development.

Table Of Content

Add On

In this development, Add On means a module package of a dynamic feature that fits and works with Keyboardly keyboard ecosystem with guidelines that are explained in this documentation.

App's Add On Navigation

App's addon navigation is a way to access installed add on like the common app menu. It can be accessed from add on the menu;

  1. if it's installed & configured the navigation, the user will be redirected to a fragment of add on by the navigation graph
  2. if not installed or not configured, a detailed add-on will appear.

It should be configured by this

Base Class

Base Class means several classes that must exist in an add-on. Member of the base class is :

  • Default Class Add On
  • DynamicDagger Class
  • DynamicFeatureImpl Class

All the class will explain below.

Default Class Add On

Default Class Add On means a class that is created as a gateway of Add On will load & work. See this sample of default class : SampleDefaultClass

DynamicDagger Class

DynamicDagger Class means a class that contains @Component & @Module dagger class to build the default class. See this sample of default class : DynamicDagger

DynamicFeatureImpl Class

DynamicFeatureImpl is a class for implementation to connect the default class with the DynamicDagger class See this sample of default class : DynamicFeatureImpl

Dynamic Feature

Dynamic Feature is a base of the add-on, to get more information see feature delivery

EditorInfo

An editorInfo describes several attributes of a text editing object that an input method is communicating with (typically an EditText), most importantly the type of text content it contains and the current cursor position. See detail.

Interface

There are several interfaces that are used in this development.

ChipGroupCallBack

Used for handle request chip options. See detail.

InputPresenter

Interface for handling when input mode is activated. See detail.

OnViewMessage

For showing a message on options areas like default RecyclerView and ChipGroup options. See detail.

OnViewReady

For showing default options with RecyclerView. See detail.

InputConnection

The InputConnection interface is the communication channel from an InputMethod back to the application that receives its input. It is used to perform such things as reading text around the cursor, committing text to the text box, and sending raw key events to the application. See detail.

InputConnection can also commit an image if the input target supports receiving it. See detail.

Keyboard Action View

Keyboard Action View is the base class for a view of the add-on that will show on the keyboard. The default parameter is Keyboard Dependency. This class is where the feature add-on started and is shown by the user. See detail KeyboardActionView

sample action view

Keyboard Action View Flow

A keyboard action view has a simple flow that should be understood. See diagram below:

Keyboard Action Dependency

Keyboard Dependency is an interface way to communicate with the main keyboard, it is just used inside the keyboard. See full source KeyboardActionDependency

This is a detail of the function member:

Name Return Description
commitText(text: String) - commit string data to an editor outside the keyboard.
getContext() Context Get the context of keyboard service/theme context.
getEditTextInput() EditText? Get current editText while on input mode (inside keyboard)
there are two types of EditText, default and long,
- default: for short input and single line
- long: for long input and multiline * return null if the keyboard is not in input mode.
getCurrentInputConnection() InputConnection Get current InputConnection where the keyboard is active
getCurrentEditorInfo() EditorInfo Get the current active EditorInfo of the cursor where the keyboard is active
getKeyboardHeight() Int height of current keyboard
isBorderMode() Boolean To check the current keyboard border theme, is border or non-border.
isDarkMode() Boolean For checking the current keyboard theme, is it dark mode or not.
loadingOnInput(loading: Boolean) - loading view while on input mode.
setTextWatcher(textWatcher: TextWatcher) - Add text watcher to input `edittext` while on input mode.
setActionView(view: KeyboardActionView) - Set view on keyboard layout, like add on menu.
setActionView(view: View?) - Set view on keyboard layout, like add on menu.
showChipOptions(...) - Show chip options from the keyboard.
showDatePicker(...) - show date picker from keyboard
showTitleAboveList(...) - Show title and back button above default Recycler view, same position with keyboard navigation.
loadingMain(loading: Boolean) - loading view on the main keyboard.
requestInput(...) - Request input text from keyboard inside a KeyboardActionView
showRecyclerViewOptions(...) - show recycler view options
showFloatingRecyclerView(...) - show recyclerview options. the position is above keyboard navigation, usually used when in input mode.
showMessageView(...) - show message on the main keyboard layout, it's related with showRecyclerViewOptions for example if search on the list, then the result is not found the message can be shown here.
setNavigationCallback(...) - Set callback navigation when the navigation keyboard changes to a submenu add-on.
setNavigationMenu(...) - Set the list menu to keyboard navigation. for example: when the add-on is installed & clicked, it should log in first before can access all the menu of the add-on.
viewAddOnNavigation() - View the addon's default submenu navigation if exists.
viewDefaultKeyboard() - reset view to default keyboard view
viewKeyboardNavigation() - view default keyboard navigation
viewLayoutAction() - Move back to the current view of KeyboardActionView. Usually, this function will called after calling `requestInput()` function or something else
showDialog() - function to show an alert dialog from keyboard
hideTopView() - function to hide view above the keyboard, like
setTopActionView(view: KeyboardActionView) - Set top view on keyboard layout, like add on menu.
setTopActionView(view: View?) - Set top view on keyboard layout, like add on menu.
setKeyboardHeight(percent: Int) - Set height keyboard runtime.
doBackSpace - function for backspace on current active editor.

Keyboard Navigation

Keyboard navigation is a list menu that appears on top of the keyboard. The default navigation is available when the user clicks the keyboard logo.

If a new add-on is installed, the logo will appear on this list keyboard navigation.

Request Input

Request Input means an activity inside KeyboardActionView to request input value like text and can be configured with options views like chip group, date picker, recyclerview, and top recyclerview.

Default Request Input

The default request input is for a short text that fits on a single line.
Triggered via KeyboardActionDependency > requestInput()

sample request input text


See sample on this

Long Text Request Input

The long request input is for long text but will appear with scrollable 2 lines inside the keyboard.
Triggered via KeyboardActionDependency > requestInput() with value longInput = true

sample request input text


See sample on this

Chip Options

Chip options are ChipGroup that can be configured via KeyboardActionDependency > showChipOptions()

sample chip options


See sample on this

Date Picker

Just like Chip Options, a KeyboardActionView can request input date via KeyboardActionDependency > showDatePicker()

sample date picker


See sample on this

Top RecyclerView

A recyclerview option that shows on top keyboard navigation. Usually, used when on input mode for quick search.


To use it, triggered it from [KeyboardDependency](#keyboard-action-dependency) > `showTopRecyclerView(...)` and combine it with `requestInput(...)` function.

See sample on this

RecyclerView Options

Recyclerview options that appeared on the keyboard area. Can be modified by the layout manager as needed.


To use it, triggered it from [KeyboardDependency](#keyboard-action-dependency) > `showTopRecyclerView(...)` and can be configured with title by `showTitleAboveList()`

See sample on this

Submenu Add On Navigation

This submenu is a list of NavigationMenuModel, if you decide to create an add-on without a submenu it can be an empty list (not null).
If an add-on contains submenu navigation and then if the user clicks the add-on logo, the default keyboard navigation will be replaced with the submenus.

The list will be called on DynamicFeatureImpl class through override method. The add-on should handle the submenu click event on the default class.


On the production version, after the user installs an **Add On**, an icon will appear automatically on the keyboard's navigation menu. If the user clicks the icon, the keyboard will do the validation :
  1. if an Add On contains a list submenu (not empty), the sub menu will appear on top of the keyboard.
  2. if not contain a list submenu, the keyboard will call getTopView() method.
  3. if topView returns null, then the keyboard will call getView() method.

On the development version, the download process was skipped. The add-on package is just included in compiling the process. To make it ready to use on the keyboard, add the menu to this navigation list. The below data should match with the add-on when creating a dynamic feature module.