-
Notifications
You must be signed in to change notification settings - Fork 217
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 looking good
app/src/common/shared/org/mozilla/vrbrowser/ui/keyboards/ChineseZhuyinKeyboard.java
Outdated
Show resolved
Hide resolved
app/src/common/shared/org/mozilla/vrbrowser/ui/keyboards/ChineseZhuyinKeyboard.java
Show resolved
Hide resolved
|
||
class DBWordHelper extends SQLiteAssetHelper { | ||
private static final String DATABASE_NAME = "zhuyin_words.db"; | ||
private static final int DATABASE_VERSION = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- how do we plan to handle migrations?
- can you file a follow-up bug to document the procedure for migrating SQLite database schemas in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app/src/common/shared/org/mozilla/vrbrowser/ui/keyboards/ChineseZhuyinKeyboard.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
private void addExtraKeyMaps() { | ||
addKeyCode("ㄅ", "10", "ㄅ"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: is there any way we can avoid duplicating the characters in the layout code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want, we can do it, but that will make it be more difficult to be read.
private String findLabelFromKey(int primaryCode) {
for (Key key : mKeyboard.getKeys()) {
if (key.codes[0] == primaryCode) {
return "" + key.label;
}
}
Log.e(LOGTAG, "Error can't find label from Zhuyin keys: " + primaryCode);
return null;
}
Then addKeyCode(Character.toString((char)0x3105), "10", findLabelFromKey(0x3105));
Or
addKeyCode(“ㄅ”, "10", findLabelFromKey(int(“ㄅ”));
@cvan
I would like like to choose the second one if we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good,
After a rebase and fixed nits I think it's ready to land.
app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/KeyboardWidget.java
Outdated
Show resolved
Hide resolved
app/src/common/shared/org/mozilla/vrbrowser/ui/keyboards/ChineseZhuyinKeyboard.java
Outdated
Show resolved
Hide resolved
@@ -679,6 +679,7 @@ private void postUICommand(Runnable aRunnable) { | |||
private void updateCandidates() { | |||
if (mInputConnection == null || !mCurrentKeyboard.supportsAutoCompletion()) { | |||
setAutoCompletionVisible(false); | |||
updateSpecialKeyLabels(); | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MortimerGoro . I notice we also need to update key labels for English keyboard when doing switch from SymbolKeyboard although it does not support autocompletion.
Landing all keyboard PRs. |
Per #640, we implement this for Zhuyin Keyboard.