From 48e768bc04ada49b185fca2ae8bc3dabd5fa64f3 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 23 Jun 2021 00:37:37 -0400 Subject: [PATCH] make scroll to top/bottom work in the log view when the EditText is not focused --- src/org/thoughtcrime/securesms/LogViewFragment.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/LogViewFragment.java b/src/org/thoughtcrime/securesms/LogViewFragment.java index 6a7633819..7992948ee 100644 --- a/src/org/thoughtcrime/securesms/LogViewFragment.java +++ b/src/org/thoughtcrime/securesms/LogViewFragment.java @@ -98,9 +98,15 @@ public class LogViewFragment extends Fragment { logPreview.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize); } - public void scrollDownLog() { logPreview.setSelection(logPreview.getText().length()); } + public void scrollDownLog() { + logPreview.requestFocus(); + logPreview.setSelection(logPreview.getText().length()); + } - public void scrollUpLog() { logPreview.setSelection(0); } + public void scrollUpLog() { + logPreview.requestFocus(); + logPreview.setSelection(0); + } public boolean saveLogFile() {