0
0
mirror of https://github.com/florisboard/florisboard.git synced 2024-09-20 03:52:18 +02:00
Commit Graph

887 Commits

Author SHA1 Message Date
Patrick Goldinger
864e65f2d5 Small tweaks 2020-05-21 02:21:41 +02:00
Patrick Goldinger
409d820665 Adopt dimens.xml for different screen densities 2020-05-21 02:21:06 +02:00
Patrick Goldinger
1b5d5d8b9e Document all classes and its methods within package .ime.media.emoji 2020-05-20 20:57:03 +02:00
Patrick Goldinger
315e6a3b2c Implement Kotlin coroutines to load EmojiKeyboardView async
- UI for EmojiKeyboardView is now loaded async upon creating the
  FlorisBoard UI, so it is ready when the user switches to the media
  context.
- Other small fixes.
2020-05-20 20:19:19 +02:00
Patrick Goldinger
a5da7f1529 Update README.md 2020-05-20 01:26:58 +02:00
Patrick Goldinger
0dfc2002c2 Improve emoji key press behaviour / Fix bugs 2020-05-20 00:46:37 +02:00
Patrick Goldinger
55df4010fd Rewrite KeyPopupManager to work with both text and emoji keyboard views
Additional changes:
- Move keyPressSound() and keyPressVibrate() methods from KeyView class
  to FlorisBoard for reuse.
- Add shape_rect.xml for a simple rect which can be color tinted.
2020-05-19 16:49:05 +02:00
Patrick Goldinger
5b56f00259 Change view switching method from visibility changing to ViewFlipper
This step vastly optimizes the layout rendering while switching. It
still jumps around, but the effect has been reduced. Also it has a nice
fade when switching between two same sized Views.
2020-05-19 02:55:46 +02:00
Patrick Goldinger
912696ec95 Add ability to insert emojis 2020-05-19 01:58:09 +02:00
Patrick Goldinger
a0c89e4561 Add icons and content descriptions to emoji category tabs 2020-05-19 01:57:38 +02:00
Patrick Goldinger
e5f18c0679 Implement base for emoji support
- Source is the official Unicode® Emoji List (emoji-test.txt)
- List is parsed in runtime and UI is built
- Some emojis do not render (bc the device does not support them)
- As of now, emojis can't be inputted
- Support of different skin tones for emojis (the data is successfully
  parsed and built, but not ready on UI-side)
- MediaInputManager has also been better organized
2020-05-19 00:44:13 +02:00
Patrick Goldinger
1c6779b059 Add Unicode® Emoji List (emoji-test.txt) 2020-05-19 00:42:42 +02:00
Patrick Goldinger
e8ee49a614 Rewrite, optimize and document TextInputManager
- TextInputManager now syncs with the editor and sets the composing
  region accordingly to the data in the editor
- The composing feature acts as a foundation for dictionary based
  suggestions and spell checking (planned feature)
- Support of CAPS flags, cursor evaluates automatically (except when in
  capsLock mode), if it should enable caps or not
- Rewrite the sendKeyPress logic, which is now better organized
- Add updateCursorAnchorInfo and updateSelection methods to
  FlorisBoard.EventListener
- Document TextInputManager

Some fixes to SmartbarManager:
- Candidate text is now regular and respects upper/lower case.
- Shows candidates only if isComposingEnabled in TextInputManager is
  set, else a number row
- Clicking on a candidate view commits this candidate to the editor
2020-05-17 02:35:53 +02:00
Patrick Goldinger
dc6cf01f15 Fix bugs 2020-05-16 01:02:23 +02:00
Patrick Goldinger
d4b31f166d Implement multi touch support for KeyboardView / Document KeyboardView
- If a user types fast (s)he will inevitable press two keys at once.
  Without multi touch one of the keys will be ignored. With multi
  touch all pressed keys will be written. The active key view is always
  the view which got the newest pointer.
- KeyboardViewRow and KeyboardView now also do not depend on any styles
  defined in styles.xml, only on attributes in themes.xml.
- Add documentation to KeyboardView and KeyboardRowView.
2020-05-16 00:13:34 +02:00
Patrick Goldinger
84cdc7143d Rewrite, optimize and document KeyView
KeyView is now extending the View class instead of AppCompatButton.
This change enables us to do some cool stuff:
- Buttons don't allow an elevation, a simple View does. Keys now have a
  shadow around them. (Planned: shadow can be toggled in preferences.)
- Buttons may have some code to help when clicking, but this is not
  helpful and actually decreases performance.
- Both the label and the drawable are now drawn manually and thus allow
  for more variety. (Planned: indicator if key has some keys hidden in
  extended popup.)
- The stupid setCompoundDrawable function of Button has been eliminated:
  To get a padding around a drawable set with this function, a helper
  drawable, which already includes this padding, had to be used. Now
  the drawable is not restricted to this and can be sized and positioned
  as wished, which means these helper drawables (key_ic_...xml) can be
  deleted.
- In general performance has been improved, the layout now does not
  flash for a short period of time when initially switching to a
  keyboard layout not yet rendered.

Each KeyView method now has a kdoc comment to help understand what the
code does and what the intentions behind some functions are.
2020-05-15 19:31:48 +02:00
Patrick Goldinger
7f17f8f300 Optimize KeyPopupManager / Add shadow to key popup
Add documentation strings to KeyPopupManager to better explain how this
class and its methods are working.
2020-05-15 02:35:47 +02:00
Patrick Goldinger
77131d7a1b Fix bugs in KeyPopupManager | Implement touchArea for keys 2020-05-14 22:38:38 +02:00
Patrick Goldinger
3ba1e30f00 Change keyboard height preference | Optimize key popup performance 2020-05-13 22:18:12 +02:00
Patrick Goldinger
8f83cfac1b Add kdoc comments to the most important classes 2020-05-13 01:51:51 +02:00
Patrick Goldinger
3ab2e1f013 Split core class FlorisBoard into Text.. and MediaInputManager
This step helps to split up media related code from normal text code.
2020-05-13 01:10:47 +02:00
Patrick Goldinger
d4b721a45c Group packages 'key', 'keyboard', 'layout' and 'smartbar' into 'text'
This change is necessary to make room for the implementation of emojis,
gif picker, etc.

This keyboard is now divided into the following parts:
 'text' with 'TextInputManager' as controller
 'media' with 'MediaInputManager' as controller

Dividing the keyboard into these two parts helps with keeping the
relative simple stuff like entering text from the more complicated
inputting media into application editors. The smartbar will also be a
'text'-only bar, as it serves no purpose for doing anything helpful
while browsing emojis. At its place in the UI will be a search bar to
search for gifs, emojis (by name), etc.

Note, that the manager classes and the 'media' package are not yet
implemented, but in final planning phase.
2020-05-12 16:52:56 +02:00
Patrick Goldinger
d80a462d97 Change implementation of updateVariation() 2020-05-12 16:33:51 +02:00
Patrick Goldinger
67d0945260 Add advanced numeric layout / Fix bug in phone number layout 2020-05-10 18:55:12 +02:00
Patrick Goldinger
80b97b2d85 Add phone number layout 2020-05-10 16:53:17 +02:00
Patrick Goldinger
71a7bcace9 Update README.md 2020-05-10 02:06:51 +02:00
Patrick Goldinger
e1256cc419 Implement variation feature (password, email, URI or text)
- Helps with accessing the special character needed (@ for email, / for url, popular TLDs in URLs, ...)
- Prevent candidate suggestions from showing while inputting a password
- Add KeyVariation enum class and JSON adapter
- Add JSON attribute "variation" to declare key variation (optional; default is ALL)
- Key variation within a key:
  - ALL = show always, regardless of current global variation setting
  - else: only shows when specific global variation is set, see .ime.key.KeyVariation for more details
- Add number row in smartbar, which shows when typing a password
- Add KeyCode URI_COMPONENT_TLD (-255)
- Rename one_handed_button_bg to a more generic name because it is also used outside the one-handed scope
2020-05-10 01:39:41 +02:00
Patrick Goldinger
7f10ccf1fc Add basic numeric layout when clicking on EditTexts intended for numbers 2020-05-04 22:43:09 +02:00
Patrick Goldinger
3a94531023 Fix background of one-handed mode buttons not showing + other fixes 2020-05-02 03:24:19 +02:00
Patrick Goldinger
5f50489b90 Add one-handed mode functionality
- Add quick action: one-handed mode toggle
- Add preference: keyboard__one_handed_mode
- Replace PrefCache with PrefHelper, enables setting a pref if wanted
- Move Smartbar layout from candidate view to input view (required to better integrate with one-handed mode design)
- Update README.md
2020-05-02 02:33:45 +02:00
Patrick Goldinger
0ea24026ac Add base for candidate view 2020-05-01 22:30:30 +02:00
Patrick Goldinger
0b3ae129d8 Update README.md 2020-05-01 17:44:20 +02:00
Patrick Goldinger
443b6d5e75 Change repo license to Apache 2.0 2020-05-01 17:42:14 +02:00
Patrick Goldinger
55e7d35a8e Fix minor issues & bugs 2020-04-30 19:33:27 +02:00
Patrick Goldinger
f0950fb879 Implement auto selection of keyViews and ability to cancel key presses
ELI5: When you press on a key and the while holding down move you couldn't escape that key press. Now, if you move to far, it cancels the initial key press and triggers a new one at the location your pointer is currently on. Also works for extended popups.
2020-04-30 18:57:00 +02:00
Patrick Goldinger
138efec980 Implement quick actions / Fix bugs in Florisboard and KeyView class 2020-04-29 22:57:44 +02:00
Patrick Goldinger
ebafa81b9b Add keyboard arrow icons and settings icon 2020-04-29 22:57:21 +02:00
Patrick Goldinger
937b0e55ee Add base layout for smartbar / candidates view 2020-04-29 17:25:13 +02:00
Patrick Goldinger
3b316dec6f Add icons to preference screen 2020-04-29 17:24:34 +02:00
Patrick Goldinger
648bcee605 Fix issues / Update README.md 2020-04-28 21:20:46 +02:00
Patrick Goldinger
5e018a89e4 Add key press sound & vibration 2020-04-28 19:43:34 +02:00
Patrick Goldinger
097c3f33f5 Add custom app logo 2020-04-28 15:51:08 +02:00
Patrick Goldinger
93db905a12 Implement app about screen
- Also include licenses of used libraries and icons
- Add privacy policy link
- Add link to source code
2020-04-24 19:14:25 +02:00
Patrick Goldinger
95b81423cb Fix visual layout measurement bugs 2020-04-24 19:10:33 +02:00
Patrick Goldinger
6ca33b14f2 Improve layout calculation and speed up initial layout measurements
- The width and height are now both set as a measured dimension rather than in the layoutParams. This reduces unnecessary measurement cycles and vastly improves performance
- The first layout switch (from characters to symbols etc.) is now smooth and does not glitch around
- The special keys in the modifier layout (ENTER, DELETE, VIEW_* (except NUMERIC) and SHIFT are now fixed in width (1.5 * the desired key width)
2020-04-24 00:41:44 +02:00
Patrick Goldinger
20430a7308 Fix bugs and improve popup creation 2020-04-22 17:55:19 +02:00
Patrick Goldinger
0d75025b14 Change icon(s) from png to vector format 2020-04-22 17:55:06 +02:00
Patrick Goldinger
78b80caceb Implement Fragments for Settings
- Add preference for long key press delay
2020-04-21 21:48:39 +02:00
Patrick Goldinger
47ab122368 Rewrite Settings implementation
- Settings proxy for launcher is now an activity-alias and not an Activity
- Settings will be split into Fragments (coming later) insteadof separate Activities
- Add preference for hiding/showing app icon
2020-04-21 18:02:31 +02:00
Patrick Goldinger
17ba361078 Optimize rendering 2020-04-21 15:50:51 +02:00