diff options
| -rw-r--r-- | res/values/strings.xml | 6 | ||||
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2.java | 14 |
2 files changed, 14 insertions, 6 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index 23a691f..c8ae629 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -36,4 +36,10 @@ <string name="pref_swipe_dist_e_default">Normal</string> <string name="pref_swipe_dist_e_far">Far</string> <string name="pref_swipe_dist_e_very_far">Very far</string> + <string name="key_action_next">Next</string> + <string name="key_action_done">Done</string> + <string name="key_action_go">Go</string> + <string name="key_action_prev">Prev</string> + <string name="key_action_search">Search</string> + <string name="key_action_send">Send</string> </resources> diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index fdaa672..06fbed5 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -141,18 +141,20 @@ public class Keyboard2 extends InputMethodService private String actionLabel_of_imeAction(int action) { + int res; switch (action) { case EditorInfo.IME_ACTION_UNSPECIFIED: - case EditorInfo.IME_ACTION_NEXT: return "Next"; - case EditorInfo.IME_ACTION_DONE: return "Done"; - case EditorInfo.IME_ACTION_GO: return "Go"; - case EditorInfo.IME_ACTION_PREVIOUS: return "Prev"; - case EditorInfo.IME_ACTION_SEARCH: return "Search"; - case EditorInfo.IME_ACTION_SEND: return "Send"; + case EditorInfo.IME_ACTION_NEXT: res = R.string.key_action_next; break; + case EditorInfo.IME_ACTION_DONE: res = R.string.key_action_done; break; + case EditorInfo.IME_ACTION_GO: res = R.string.key_action_go; break; + case EditorInfo.IME_ACTION_PREVIOUS: res = R.string.key_action_prev; break; + case EditorInfo.IME_ACTION_SEARCH: res = R.string.key_action_search; break; + case EditorInfo.IME_ACTION_SEND: res = R.string.key_action_send; break; case EditorInfo.IME_ACTION_NONE: default: return null; } + return getResources().getString(res); } private void refreshEditorInfo(EditorInfo info) |
