Random bugs
* ABC Mode: fixed candidate letter disappearing, when changing the text case, after the same number key has been pressed twice or more * Predictive Mode: fixed words not being automatically capitalized if text is entered and deleted repeatedly * fixed the on-screen keys having incorrect height
This commit is contained in:
parent
1e88f81e77
commit
2b25eae760
4 changed files with 8 additions and 12 deletions
|
|
@ -13,9 +13,8 @@
|
||||||
android:background="@color/candidate_background" />
|
android:background="@color/candidate_background" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/softkey_view"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="@dimen/soft_key_height"
|
||||||
android:background="@drawable/bggradient"
|
android:background="@drawable/bggradient"
|
||||||
android:baselineAligned="true"
|
android:baselineAligned="true"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,6 @@
|
||||||
<dimen name="candidate_padding_horizontal">6sp</dimen>
|
<dimen name="candidate_padding_horizontal">6sp</dimen>
|
||||||
<dimen name="candidate_padding_vertical">1sp</dimen>
|
<dimen name="candidate_padding_vertical">1sp</dimen>
|
||||||
|
|
||||||
<dimen name="soft_key_height">36dp</dimen>
|
<dimen name="soft_key_height">44dp</dimen>
|
||||||
<dimen name="soft_key_icon_size">24sp</dimen>
|
<dimen name="soft_key_icon_size">24sp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,6 @@ public class TraditionalT9 extends KeyPadHandler {
|
||||||
|
|
||||||
mInputMode.onAcceptSuggestion(mLanguage, mSuggestionView.getCurrentSuggestion());
|
mInputMode.onAcceptSuggestion(mLanguage, mSuggestionView.getCurrentSuggestion());
|
||||||
commitCurrentSuggestion();
|
commitCurrentSuggestion();
|
||||||
determineNextTextCase();
|
|
||||||
resetKeyRepeat();
|
resetKeyRepeat();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -201,10 +200,11 @@ public class TraditionalT9 extends KeyPadHandler {
|
||||||
if (mInputMode.shouldAcceptCurrentSuggestion(mLanguage, key, hold, repeat)) {
|
if (mInputMode.shouldAcceptCurrentSuggestion(mLanguage, key, hold, repeat)) {
|
||||||
mInputMode.onAcceptSuggestion(mLanguage, getComposingText());
|
mInputMode.onAcceptSuggestion(mLanguage, getComposingText());
|
||||||
commitCurrentSuggestion(false);
|
commitCurrentSuggestion(false);
|
||||||
determineNextTextCase();
|
}
|
||||||
} else if (!InputFieldHelper.isThereText(currentInputConnection)) {
|
|
||||||
// it would have been nice to determine the text case on every key press,
|
// Auto-adjust the text case before each word, if the InputMode supports it.
|
||||||
// but it is somewhat resource-intensive
|
// We don't do it too often, because it is somewhat resource-intensive.
|
||||||
|
if (getComposingText().length() == 0) {
|
||||||
determineNextTextCase();
|
determineNextTextCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -427,9 +427,7 @@ public class TraditionalT9 extends KeyPadHandler {
|
||||||
// when typing a word or viewing scrolling the suggestions, only change the case
|
// when typing a word or viewing scrolling the suggestions, only change the case
|
||||||
else if (!isSuggestionViewHidden()) {
|
else if (!isSuggestionViewHidden()) {
|
||||||
mInputMode.nextTextCase();
|
mInputMode.nextTextCase();
|
||||||
ArrayList<String> switchedSuggestions = mInputMode.getSuggestions(mLanguage);
|
setSuggestions(mInputMode.getSuggestions(mLanguage), mSuggestionView.getCurrentIndex());
|
||||||
|
|
||||||
setSuggestions(switchedSuggestions, mSuggestionView.getCurrentIndex());
|
|
||||||
refreshComposingText();
|
refreshComposingText();
|
||||||
}
|
}
|
||||||
// make "abc" and "ABC" separate modes from user perspective
|
// make "abc" and "ABC" separate modes from user perspective
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ public class ModeABC extends InputMode {
|
||||||
suggestions = new ArrayList<>();
|
suggestions = new ArrayList<>();
|
||||||
word = String.valueOf(key);
|
word = String.valueOf(key);
|
||||||
} else if (repeat) {
|
} else if (repeat) {
|
||||||
suggestions = new ArrayList<>();
|
|
||||||
shouldSelectNextLetter = true;
|
shouldSelectNextLetter = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue