Compare commits

...

6 Commits

Author SHA1 Message Date
Patrick Goldinger
64040f0407 Release v0.3.12 2021-05-10 15:47:05 +02:00
Patrick Goldinger
0c1abdd507 Merge pull request #850 from X-yl/master
Stop glide suggestions disappearing and remove the redundant first suggestion
2021-05-10 15:28:21 +02:00
Patrick Goldinger
53594e3343 Fix glide logic not triggering when shift/caps is active (#847) 2021-05-10 15:22:45 +02:00
X-yl
c6c06b87c5 Stop glide suggestions disappearing and remove redundant first option 2021-05-10 16:52:50 +04:00
Patrick Goldinger
ae6eb5d72d Release v0.3.11 2021-05-10 00:06:07 +02:00
Patrick Goldinger
bbce53fdf4 Update README and open-source licenses 2021-05-09 20:45:33 +02:00
8 changed files with 51 additions and 58 deletions

View File

@@ -74,8 +74,8 @@ milestones, please refer to the [Feature roadmap](#feature-roadmap).
### Layouts
* [x] Latin character layouts (QWERTY, QWERTZ, AZERTY, Swiss, Spanish, Norwegian, Swedish/Finnish, Icelandic, Danish,
Hungarian, Croatian, Polish, Romanian, Colemak, Dvorak, Turkish-Q, Turkish-F, ...)
* [x] Non-latin character layouts (Arabic, Persian, Kurdish, Greek, Russian (JCUKEN))
Hungarian, Croatian, Polish, Romanian, Colemak, Dvorak, Turkish-Q, Turkish-F, and more...)
* [x] Non-latin character layouts (Arabic, Persian, Kurdish, Greek, Russian (JCUKEN), and more...)
* [x] Adapt to situation in app (password, url, text, etc. )
* [x] Special character layout(s)
* [x] Numeric layout
@@ -93,6 +93,7 @@ milestones, please refer to the [Feature roadmap](#feature-roadmap).
* [x] Subtype selection (language/layout)
* [x] Keyboard behaviour preferences
* [x] Gesture preferences
* [x] User dictionary manager (system and internal)
### Other useful features
* [x] One-handed mode
@@ -100,6 +101,8 @@ milestones, please refer to the [Feature roadmap](#feature-roadmap).
* [x] Clipboard manager/history
* [x] Integrated number row / symbols in character layouts
* [x] Gesture support
* [x] Full support for the system user dictionary (shared dictionary
between all keyboards) and a private, internal user dictionary
* [x] Full integration in IME service list of Android (xml/method)
(integration is internal-only, because Android's default subtype
implementation not really allows for dynamic language/layout
@@ -131,13 +134,14 @@ close as possible.
- Next-word suggestions by training language models. Data collected here is stored locally and never leaves
the user's device.
- Module C: Extension packs (base implementation with [#162])
- Module C: Extension packs (Implemented with [#162], reworked several times and still not stable)
- Ability to load dictionaries (and later potentially other cool
features too) only if needed to keep the core APK size small
- Currently unclear how exactly this will work, but this is definitely
a must-have feature
- A full implementation may come only in v0.5.0
- Module D: Glide typing
- Module D: Glide typing (Implemented with [#544])
- Swiping over the characters will automatically convert this to a word
- Possibly also add improvements based on the Flow keyboard
@@ -151,9 +155,11 @@ close as possible.
- Theme import/export
### [v0.5.0](https://github.com/florisboard/florisboard/milestone/5)
There's no exact roadmap yet but it is planned that the media part of
FlorisBoard (emojis, emoticons, kaomoji) gets a rework. Also as an extension
(requires v0.4.0/Module C) GIF support is planned.
There's no exact roadmap yet, but these are the most important points:
- Full layout customization in runtime
- Extensive rework and customization of the media input (emojis, emoticons, kaomoji)
- Better Smartbar customization
- As an extension GIF support
### > v0.5.0
This is completely open as of now and will gather planned features as time
@@ -166,6 +172,7 @@ Backlog (currently not assigned to any milestone):
[#91]: https://github.com/florisboard/florisboard/pull/91
[#162]: https://github.com/florisboard/florisboard/pull/162
[#329]: https://github.com/florisboard/florisboard/pull/329
[#544]: https://github.com/florisboard/florisboard/pull/544
## Contributing
Wanna contribute to FlorisBoard? That's great to hear! There are lots of
@@ -183,8 +190,8 @@ to get more information on this topic.
by [google](https://github.com/google)
* [Google Material icons](https://github.com/google/material-design-icons) by
[google](https://github.com/google)
* [Moshi JSON library](https://github.com/square/moshi) by
[square](https://github.com/square)
* [KotlinX serialization library](https://github.com/Kotlin/kotlinx.serialization) by
[Kotlin](https://github.com/Kotlin)
* [ColorPicker preference](https://github.com/jaredrummler/ColorPicker) by
[Jared Rummler](https://github.com/jaredrummler)
* [Timber](https://github.com/JakeWharton/timber) by
@@ -194,7 +201,7 @@ to get more information on this topic.
## Usage notes for included binary dictionary files
All binary dictionaries included within this project in
(this)[app/src/main/assets/ime/dict) asset folder are built from various
(this)[app/src/main/assets/ime/dict] asset folder are built from various
sources, as stated below.
### Source 1: [wordfreq library by LuminosoInsight](https://github.com/LuminosoInsight/wordfreq):

View File

@@ -24,8 +24,8 @@ android {
applicationId = "dev.patrickgold.florisboard"
minSdkVersion(23)
targetSdkVersion(30)
versionCode(41)
versionName("0.3.11")
versionCode(43)
versionName("0.3.12")
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -503,24 +503,6 @@ SOFTWARE.
<hr>
<h3>kotlin-result</h3>
<span>Copyright (c) 2017-2020 Michael Bull (https://www.michael-bull.com)</span>
<pre>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
</pre>
<hr>
<h3>Material Icons</h3>
<span>Copyright 2018 Google LLC</span>
<pre>
@@ -729,24 +711,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
<hr>
<h3>Moshi</h3>
<span>Copyright 2015 Square, Inc.</span>
<pre>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</pre>
<hr>
<h3>Timber</h3>
<span>Copyright 2013 Jake Wharton</span>
<pre>

View File

@@ -444,7 +444,7 @@ class TextInputManager private constructor() : CoroutineScope by MainScope(), In
}
smartbarView?.updateSmartbarState()
flogInfo(LogTopic.IMS_EVENTS) { "current word: ${activeEditorInstance.cachedInput.currentWord.text}" }
if (activeEditorInstance.isComposingEnabled && !inputEventDispatcher.isPressed(KeyCode.DELETE)) {
if (activeEditorInstance.isComposingEnabled && !inputEventDispatcher.isPressed(KeyCode.DELETE) && !isGlidePostEffect) {
if (activeEditorInstance.shouldReevaluateComposingSuggestions) {
activeEditorInstance.shouldReevaluateComposingSuggestions = false
activeDictionary?.let {

View File

@@ -10,6 +10,7 @@ import dev.patrickgold.florisboard.ime.text.TextInputManager
import dev.patrickgold.florisboard.ime.text.keyboard.TextKey
import kotlinx.coroutines.*
import org.json.JSONObject
import kotlin.math.min
/**
* Handles the [GlideTypingClassifier]. Basically responsible for linking [GlideTypingGesture.Detector]
@@ -62,6 +63,7 @@ class GlideTypingManager : GlideTypingGesture.Listener, CoroutineScope by MainSc
}
private val wordDataCache = hashMapOf<String, Int>()
/**
* Set the word data for the internal gesture classifier
*/
@@ -70,7 +72,8 @@ class GlideTypingManager : GlideTypingGesture.Listener, CoroutineScope by MainSc
if (wordDataCache.isEmpty()) {
// FIXME: get this info from dictionary.
val data =
AssetManager.default().loadTextAsset(AssetRef(AssetSource.Assets, "ime/dict/data.json")).getOrThrow()
AssetManager.default().loadTextAsset(AssetRef(AssetSource.Assets, "ime/dict/data.json"))
.getOrThrow()
val json = JSONObject(data)
wordDataCache.putAll(json.keys().asSequence().map { Pair(it, json.getInt(it)) })
}
@@ -102,7 +105,10 @@ class GlideTypingManager : GlideTypingGesture.Listener, CoroutineScope by MainSc
textInputManager.isGlidePostEffect = true
textInputManager.smartbarView?.setCandidateSuggestionWords(
time,
suggestions.take(maxSuggestionsToShow).map { textInputManager.fixCase(it) }
suggestions.subList(
1.coerceAtMost(min(commit.compareTo(false), suggestions.size)),
maxSuggestionsToShow.coerceAtMost(suggestions.size)
).map { textInputManager.fixCase(it) }
)
textInputManager.smartbarView?.updateCandidateSuggestionCapsState()
if (commit && suggestions.isNotEmpty()) {

View File

@@ -4,14 +4,18 @@ import android.util.SparseArray
import androidx.collection.LruCache
import androidx.core.util.set
import dev.patrickgold.florisboard.ime.core.Subtype
import dev.patrickgold.florisboard.ime.keyboard.Key
import dev.patrickgold.florisboard.ime.text.key.KeyCode
import dev.patrickgold.florisboard.ime.text.keyboard.TextKey
import dev.patrickgold.florisboard.ime.text.keyboard.TextKeyData
import java.text.Normalizer
import java.util.*
import kotlin.collections.HashMap
import kotlin.math.*
private fun TextKey.baseCode(): Int {
return (data as? TextKeyData)?.code ?: KeyCode.UNSPECIFIED
}
/**
* Classifies gestures by comparing them with an "ideal gesture".
*
@@ -95,7 +99,7 @@ class StatisticalGlideTypingClassifier : GlideTypingClassifier {
keysByCharacter.clear()
keys.clear()
keyViews.forEach {
keysByCharacter[it.computedData.code] = it
keysByCharacter[it.baseCode()] = it
keys.add(it)
}
layoutSubtype = subtype
@@ -271,7 +275,7 @@ class StatisticalGlideTypingClassifier : GlideTypingClassifier {
* @return A list of likely words.
*/
fun pruneByExtremities(
userGesture: Gesture, keys: Iterable<Key>
userGesture: Gesture, keys: Iterable<TextKey>
): ArrayList<String> {
val remainingWords = ArrayList<String>()
val startX = userGesture.getFirstX()
@@ -338,7 +342,7 @@ class StatisticalGlideTypingClassifier : GlideTypingClassifier {
else -> {
val firstKey = keysByCharacter[firstBaseChar.code]
val lastKey = keysByCharacter[lastBaseChar.code]
Pair(firstKey.computedData.code, lastKey.computedData.code)
Pair(firstKey.baseCode(), lastKey.baseCode())
}
}
}
@@ -353,16 +357,16 @@ class StatisticalGlideTypingClassifier : GlideTypingClassifier {
* @return A list of the n closest keys.
*/
private fun findNClosestKeys(
x: Float, y: Float, n: Int, keys: Iterable<Key>
x: Float, y: Float, n: Int, keys: Iterable<TextKey>
): Iterable<Int> {
val keyDistances = HashMap<Key, Float>()
val keyDistances = HashMap<TextKey, Float>()
for (key in keys) {
val distance = Gesture.distance(key.visibleBounds.centerX().toFloat(), key.visibleBounds.centerY().toFloat(), x, y)
keyDistances[key] = distance
}
return keyDistances.entries.sortedWith { c1, c2 -> c1.value.compareTo(c2.value) }.take(n)
.map { (it.key as? TextKey)?.computedData?.code ?: KeyCode.UNSPECIFIED }
.map { it.key.baseCode() }
}
}

View File

@@ -0,0 +1,7 @@
This version brings vast improvements in the layout logic and
memory management, adds support for user dictionaries, several
new keyboard layouts and much more. Additionally a lot of crashes,
bugs and more have been fixed, making FlorisBoard more stable for
you.
Detailed changelog: https://github.com/florisboard/florisboard/releases/tag/v0.3.11

View File

@@ -0,0 +1,5 @@
This version is a hotfix release which makes glide typing
fully usable again (in v0.3.11 you couldn't glide while shift
or caps was active).
Detailed changelog: https://github.com/florisboard/florisboard/releases/tag/v0.3.12