Skip to content

Commit 087da0b

Browse files
Fixed: Fix issue where a colour tint/highlight would be added to the terminal on activity re-creation
The fix in c6b4114 was not working for it.
1 parent d7f2298 commit 087da0b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/src/main/java/com/termux/app/terminal/TermuxTerminalViewClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,8 @@ public void setSoftKeyboardState(boolean isStartup, boolean isReloadTermuxProper
541541
// disabled or hidden at startup, otherwise if hardware keyboard is attached and user
542542
// starts typing on hardware keyboard without tapping on the terminal first, then a colour
543543
// tint will be added to the terminal as highlight for the focussed view. Test with a light
544-
// theme.
544+
// theme. For android 8.+, the "defaultFocusHighlightEnabled" attribute is also set to false
545+
// in TerminalView layout to fix the issue.
545546

546547
// If soft keyboard is disabled by user for Termux (check function docs for Termux behaviour info)
547548
if (KeyboardUtils.shouldSoftKeyboardBeDisabled(mActivity,

app/src/main/res/layout/activity_termux.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<com.termux.app.terminal.TermuxActivityRootView xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:app="http://schemas.android.com/apk/res-auto"
3+
xmlns:tools="http://schemas.android.com/tools"
24
android:id="@+id/activity_termux_root_view"
35
android:layout_width="match_parent"
46
android:layout_height="match_parent"
@@ -25,11 +27,13 @@
2527
android:id="@+id/terminal_view"
2628
android:layout_width="match_parent"
2729
android:layout_height="match_parent"
30+
android:defaultFocusHighlightEnabled="false"
2831
android:focusableInTouchMode="true"
2932
android:scrollbarThumbVertical="@drawable/terminal_scroll_shape"
3033
android:scrollbars="vertical"
3134
android:importantForAutofill="no"
32-
android:autofillHints="password" />
35+
android:autofillHints="password"
36+
tools:ignore="UnusedAttribute" />
3337

3438
<LinearLayout
3539
android:id="@+id/left_drawer"

0 commit comments

Comments
 (0)