diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-12-19 18:51:38 +0300 |
---|---|---|
committer | Niedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com> | 2020-12-21 13:49:02 +0300 |
commit | 2a41a2ba0d8d72d83fb2d4308a24e69f82375e8e (patch) | |
tree | b3013f53103f795df0830c85bc77712b0ec36921 /app/src/main | |
parent | 26356d7c2433084b8678e5ce04f5825e218b886d (diff) |
Apply branding to search highlighting
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/card/details/CardDetailsFragment.java | 21 |
1 files changed, 2 insertions, 19 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 2dca3ec2e..c00decc50 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 @@ -133,6 +133,8 @@ public class CardDetailsFragment extends BrandedFragment implements OnDateSetLis applyBrandToEditText(mainColor, binding.dueDateDate); applyBrandToEditText(mainColor, binding.dueDateTime); applyBrandToEditText(mainColor, binding.people); + binding.descriptionEditor.setSearchColor(mainColor); + binding.descriptionViewer.setSearchColor(mainColor); } private void setupDescription() { @@ -162,25 +164,6 @@ 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); |