From 622ff4fad4e58713364523e0a2c50ce07a32211f Mon Sep 17 00:00:00 2001 From: agnostic-apollo Date: Sat, 5 Feb 2022 06:26:23 +0500 Subject: [PATCH] Fixed: Fix issue where a colour tint/highlight would be added to the terminal on activity re-creation The fix in c6b4114f was not working for it. --- .../com/termux/app/terminal/TermuxTerminalViewClient.java | 3 ++- app/src/main/res/layout/activity_termux.xml | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/termux/app/terminal/TermuxTerminalViewClient.java b/app/src/main/java/com/termux/app/terminal/TermuxTerminalViewClient.java index 745abfa0..5bcd7ce0 100644 --- a/app/src/main/java/com/termux/app/terminal/TermuxTerminalViewClient.java +++ b/app/src/main/java/com/termux/app/terminal/TermuxTerminalViewClient.java @@ -538,7 +538,8 @@ public class TermuxTerminalViewClient extends TermuxTerminalViewClientBase { // disabled or hidden at startup, otherwise if hardware keyboard is attached and user // starts typing on hardware keyboard without tapping on the terminal first, then a colour // tint will be added to the terminal as highlight for the focussed view. Test with a light - // theme. + // theme. For android 8.+, the "defaultFocusHighlightEnabled" attribute is also set to false + // in TerminalView layout to fix the issue. // If soft keyboard is disabled by user for Termux (check function docs for Termux behaviour info) if (KeyboardUtils.shouldSoftKeyboardBeDisabled(mActivity, diff --git a/app/src/main/res/layout/activity_termux.xml b/app/src/main/res/layout/activity_termux.xml index 4bd61bab..713e2b2c 100644 --- a/app/src/main/res/layout/activity_termux.xml +++ b/app/src/main/res/layout/activity_termux.xml @@ -1,5 +1,6 @@ + android:autofillHints="password" + tools:ignore="UnusedAttribute" />