From 087da0b5767aa10363d2379a2a41c35d9eddfc9a 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 | 6 +++++- 2 files changed, 7 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 0a565a9a..b8ccea1a 100644 --- a/app/src/main/java/com/termux/app/terminal/TermuxTerminalViewClient.java +++ b/app/src/main/java/com/termux/app/terminal/TermuxTerminalViewClient.java @@ -541,7 +541,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 144e846c..6da3680a 100644 --- a/app/src/main/res/layout/activity_termux.xml +++ b/app/src/main/res/layout/activity_termux.xml @@ -1,4 +1,6 @@ + android:autofillHints="password" + tools:ignore="UnusedAttribute" />