From 98c1b8db82c0da8f49eb12d18c9001a57009eca5 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 27 Jul 2025 22:09:45 +0200 Subject: Candidates view The `CandidatesView` is implemented as a `LinearLayout` that is divided horizontally with up to 3 `TextView`. It might in the future contain buttons on the sides. The candidate view is nested into the input view rather than using Android's `setCandidatesView` and callbacks as the API is unreliable and complicated. The first suggestion goes in the middle to be more accessible. The second suggestion goes on the right to be more accessible to the right-handed, because it must go somewhere. --- res/layout/keyboard.xml | 9 ++- res/values/styles.xml | 6 ++ res/values/values.xml | 1 + srcs/juloo.keyboard2/CandidatesView.java | 104 ++++++++++++++++++++++++++++++ srcs/juloo.keyboard2/Config.java | 3 + srcs/juloo.keyboard2/KeyEventHandler.java | 6 ++ srcs/juloo.keyboard2/Keyboard2.java | 30 +++++++-- srcs/juloo.keyboard2/Keyboard2View.java | 2 - srcs/juloo.keyboard2/Logs.java | 2 + 9 files changed, 154 insertions(+), 9 deletions(-) create mode 100644 srcs/juloo.keyboard2/CandidatesView.java diff --git a/res/layout/keyboard.xml b/res/layout/keyboard.xml index 8af048d..82575be 100644 --- a/res/layout/keyboard.xml +++ b/res/layout/keyboard.xml @@ -1,2 +1,9 @@ - + + + + + + + + diff --git a/res/values/styles.xml b/res/values/styles.xml index 9763c04..5b00ca3 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -1,5 +1,11 @@ + +