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

111 Commits

Author SHA1 Message Date
Patrick Goldinger
1e47f79674 Add theme applying to keyboard after being set in preferences 2020-06-13 13:48:04 +02:00
Patrick Goldinger
27c4c158d6 Fix input view layout not rendering correctly after toggling one-handed mode
- Add refreshLayoutFor(view) function in view_utils.kt (will also be useful for
  layout refreshes in other parts of the keyboard)
2020-06-10 21:07:06 +02:00
Patrick Goldinger
f6a50a1f3a Fix keyboard not loading when it is initialized a second time
- Introduced a new InputView, which notifies the core FlorisBoard when it
  has been attached to a window
- Add debug-only logs to some functions to better understand the calling order
  of the methods
2020-06-10 19:21:59 +02:00
Patrick Goldinger
2792b193ba Improve initial keyboard loading time 2020-06-07 23:55:59 +02:00
Patrick Goldinger
995d403cdf Quick action container now auto collapses when switching to media context
- MediaInputManager is now a Singleton class too
- TextInputManager now utilises both onCreate() and onCreateInputView()
- Other small fixes in documentation strings
2020-06-07 22:06:00 +02:00
Patrick Goldinger
68185f8e95 Optimize SmartbarManager and smartbar layout
- SmartbarManager is now a Singleton class to avoid multiple instances
- SmartbarView is now separated from SmartbarManager and tells SmartbarManager
  that it is the new active SmartbarView (preparation step for dynamic theme
  applying)
- SmartbarView now inflates together with the main florisboard layout rather
  than being created later on
- QuickActionButtons are now responsive to the SmartbarView height
- Other bug fixes
2020-06-07 21:10:02 +02:00
Patrick Goldinger
3cf4e336ac Optimize SettingsMainActivity.kt 2020-06-07 18:07:51 +02:00
Patrick Goldinger
20616bf260 Add switch to media context key / Add fun launchSettings() to core
- Currently this key is always visible, but in the future
  it will only be visible if there is only 1 language
  set in prefs.
2020-06-06 19:23:26 +02:00
Patrick Goldinger
e6f3fc4256 Fix navigation bar coloring / Fix crashes + bugs 2020-06-03 19:40:30 +02:00
Patrick Goldinger
03b0ec7e3f Update README.md + build.gradle / Fix bug 2020-06-02 01:10:38 +02:00
Patrick Goldinger
2a5c236e01 Improve layout and sync smartbar height with key height 2020-06-02 00:51:47 +02:00
Patrick Goldinger
b05bd166e3 Add dark theme for keyboard / Fix bugs which caused crashes
- Currently only 2 themes are supported light and dark theme
- Ca be selected and previewed in settings
- Improve and extend PrefHelper functionality
- Fix bugs where currentInputConnection may be null but had
  not been null-checked before using it
2020-06-01 23:05:09 +02:00
Patrick Goldinger
d19405fcc4 Improve PrefHelper / Fix crashes + bugs
- Improve PrefHelper to be better organized
- Fix crashes that occur when changing orientation
- Fix bug that recyclerView steals focus and tries to
  create its own scrollbar
2020-06-01 04:30:23 +02:00
Patrick Goldinger
1c819ab995 Add KeyboardView preview in Looknfeel section 2020-06-01 02:10:58 +02:00
Patrick Goldinger
7e7098232e Add Settings dark theme
Additionally add KeyboardView preview in Settings (Looknfeel section).
2020-06-01 02:10:10 +02:00
Patrick Goldinger
a61b8c9e99 Add KeyboardView preview mode support
Useful for showing a preview of the KeyboardView in
Settings.
2020-06-01 02:07:52 +02:00
Patrick Goldinger
6d47ec7607 Overhaul Settings screen
- Settings screen now has a BottomNavigationView as
  main navigation
- Home: Place where the user is welcomed and
  other stuff like that
- Keyboard: Everything language, layout or text
  correction related stuff
- Look & feel: Everything related to key press
  sounds and the theme of the keyboard
- Gestures: All gesture (and glide typing)prefs
- Advanced: All other things which have no real
  category
2020-05-31 02:24:45 +02:00
Patrick Goldinger
d86dad6982 Update gradle build tools to 4.0.0 2020-05-29 19:17:25 +02:00
Patrick Goldinger
ba163cf0f7 Improve dimens.xml structure 2020-05-29 18:51:44 +02:00
Patrick Goldinger
63297da32b Improve extended key popup positioning
- Extended popup now centers if possible
- If there is not enough space available, it will still try to
  shift as much characters as possible to achieve a semi-centered
  position.
2020-05-27 22:21:53 +02:00
Patrick Goldinger
ce6630a2d3 Improve layouts + dimensions / Style media tab indicators 2020-05-25 16:48:00 +02:00
Patrick Goldinger
7417f73a06 Add triangle to indicate popup on EmojiKeyViews
Other changes:
- EmojiKeyboardView will now only show emojis that can actually be
  rendered by the system font.
2020-05-22 23:25:31 +02:00
Patrick Goldinger
f74fc22e95 Revert previous changes regarding the dimens.xml file
The problem is not the pixel density, but the screen size/screen height
not taken into account by the Android system when converting dp to px.
One idea would be to experiment with the -swXXXdp value folders.
2020-05-22 21:57:33 +02:00
Patrick Goldinger
d2943cc620 Update build.gradle 2020-05-21 02:29:59 +02:00
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