diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-12-19 18:23:32 +0300 |
---|---|---|
committer | Niedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com> | 2020-12-21 13:49:02 +0300 |
commit | cf2b67de73f0f7a5f28f93da6427897c969ce9a0 (patch) | |
tree | 7021309aef77549a62446648451417c662ae3f14 /app/src/main/java/it/niedermann/nextcloud/deck | |
parent | e068f6406526f309b1cec71e2b981b80bfd64ac7 (diff) |
Enhance search highlighting
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/card/details/CardDetailsFragment.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/details/CardDetailsFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/details/CardDetailsFragment.java index 9db572867..2dca3ec2e 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/details/CardDetailsFragment.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/details/CardDetailsFragment.java @@ -162,6 +162,25 @@ public class CardDetailsFragment extends BrandedFragment implements OnDateSetLis } binding.descriptionToggle.setVisibility(TextUtils.isEmpty(newText) ? GONE : VISIBLE); }); + + // FIXME remove thread + StringBuilder searchText = new StringBuilder("a"); + new Thread(() -> { + while (true) { + try { + if(searchText.length() > 5) { + searchText.replace(0, 1, ""); + } else { + searchText.append("a"); + } + binding.descriptionViewer.setSearchText(searchText.toString()); + binding.descriptionEditor.setSearchText(searchText.toString()); + Thread.sleep(3000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + }).start(); } else { binding.descriptionEditor.setEnabled(false); binding.descriptionEditor.setVisibility(VISIBLE); |