Termux x11 port

This commit is contained in:
Caten
2024-09-20 21:39:48 +08:00
parent 958d7839ff
commit a117050fde
136 changed files with 19410 additions and 92 deletions

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/res/anim/slide_in_left.xml
**
** Copyright 2007, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="-50%p" android:toXDelta="0"
android:duration="@android:integer/config_mediumAnimTime"/>
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="@android:integer/config_mediumAnimTime" />
</set>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/res/anim/slide_in_right.xml
**
** Copyright 2007, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="50%p" android:toXDelta="0"
android:duration="@android:integer/config_mediumAnimTime"/>
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="@android:integer/config_mediumAnimTime" />
</set>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/res/anim/slide_out_left.xml
**
** Copyright 2007, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="-50%p"
android:duration="@android:integer/config_mediumAnimTime"/>
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
android:duration="@android:integer/config_mediumAnimTime" />
</set>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/res/anim/slide_out_right.xml
**
** Copyright 2007, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="50%p"
android:duration="@android:integer/config_mediumAnimTime"/>
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
android:duration="@android:integer/config_mediumAnimTime" />
</set>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="500dp"
android:height="410dp"
android:viewportWidth="500"
android:viewportHeight="410">
<group>
<path
android:strokeWidth="1"
android:pathData="M 0 0 H 501 V 407 H 0 V 0 Z" />
<group>
<path
android:fillColor="#ffffff"
android:strokeWidth="1"
android:pathData="M 13,15 L 154,201 154,203 13,390 85,390 190,249 226,297 297,297 85,15 13,15 Z" />
<path
android:fillColor="#ffffff"
android:strokeWidth="1"
android:pathData="M 485,343 L 273,343 273,390 485,390 485,343 485,343 Z" />
<path
android:fillColor="#ffffff"
android:strokeWidth="1"
android:pathData="M 367,15 L 296,15 205,136 240,183 367,15 367,15 Z" />
</group>
</group>
</vector>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="#777777" />
<stroke android:width="2dp" android:color="#000000" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="#FFFFFF" />
<stroke android:width="0.5dp" android:color="#000000" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="20dp"
android:paddingBottom="20dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:orientation="vertical">
<EditText
android:id="@+id/extra_keys_config"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="top|start"
android:inputType="textMultiLine"
android:lines="10"
android:minLines="5"
android:textSize="16sp"
android:scrollHorizontally="true"
android:scrollbars="vertical"
android:autofillHints=""
tools:ignore="LabelFor" />
<TextView
android:id="@+id/extra_keys_config_description"
android:text="@string/extra_keys_config_desc"
android:textSize="18sp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

View File

@@ -26,7 +26,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/margin_small"
android:text="@string/app_name"
android:text="@string/avnc_app_name"
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline5" />
<TextView

View File

@@ -20,7 +20,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:text="@string/avnc_app_name"
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline5" />
<TextView
@@ -34,7 +34,7 @@
android:layout_marginTop="@dimen/margin_large"
android:layout_marginBottom="@dimen/margin_normal"
android:drawablePadding="@dimen/padding_small"
android:text='@{@string/app_name + " is released under the GNU General Public License, version 3 or later."}'
android:text='@{@string/avnc_app_name + " is released under the GNU General Public License, version 3 or later."}'
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
app:drawableEndCompat="@drawable/ic_gpl" />
@@ -44,7 +44,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_normal"
android:layout_marginBottom="@dimen/margin_normal"
android:text='@{@string/app_name + " uses code which is released under one or more of the licenses listed below."}'
android:text='@{@string/avnc_app_name + " uses code which is released under one or more of the licenses listed below."}'
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" />
<View

View File

@@ -0,0 +1,285 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black">
<FrameLayout
android:id="@+id/frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:layoutDirection="ltr"
android:paddingLeft="0dp"
android:paddingTop="0dp"
android:paddingRight="0dp"
android:paddingBottom="0dp"
android:background="@android:color/black">
<com.termux.x11.LorieView
android:id="@+id/lorieView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible"
android:layout_gravity="center" />
<LinearLayout
android:id="@+id/stub"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black"
android:gravity="center_horizontal|center_vertical"
android:orientation="vertical"
android:visibility="visible">
<ImageView
android:id="@+id/x11_image"
android:layout_width="130dp"
android:layout_height="130dp"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_x11_icon"
android:contentDescription="X Logo"
tools:ignore="HardcodedText" />
<Space
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="20dp" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal|center_vertical"
android:text="@string/not_connected"
android:textColor="#FFFFFF"
android:textSize="20sp" />
<Space
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="40dp" />
<Button
android:id="@+id/preferences_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/preferences_button_text" />
<Space
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="10dp" />
<Button
android:id="@+id/help_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/help_button_text" />
<Space
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="10dp" />
<Button
android:id="@+id/exit_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/exit_button_text" />
</LinearLayout>
</FrameLayout>
<LinearLayout
android:id="@+id/mouse_helper_visibility"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:translationX="0px"
android:translationY="0px">
<Button
android:id="@+id/button_visibility"
android:layout_width="64px"
android:layout_height="64px"
android:minWidth="44dip"
android:minHeight="22dip"
android:padding="0px"
android:paddingStart="0px"
android:paddingLeft="0px"
android:paddingTop="0px"
android:paddingEnd="0px"
android:paddingRight="0px"
android:paddingBottom="0px"
android:text="X"
android:textSize="8sp"
tools:ignore="HardcodedText,PxUsage,SmallSp" />
<LinearLayout
android:id="@+id/mouse_helper_secondary_layer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:visibility="visible">
<Button
android:id="@+id/button_left_click"
android:layout_width="64px"
android:layout_height="64px"
android:minWidth="44dip"
android:minHeight="22dip"
android:padding="0px"
android:paddingStart="0px"
android:paddingLeft="0px"
android:paddingTop="0px"
android:paddingEnd="0px"
android:paddingRight="0px"
android:paddingBottom="0px"
android:text="L"
android:textSize="8sp"
tools:ignore="HardcodedText,PxUsage,SmallSp" />
<Button
android:id="@+id/button_middle_click"
android:layout_width="64px"
android:layout_height="64px"
android:minWidth="44dip"
android:minHeight="22dip"
android:padding="0px"
android:paddingStart="0px"
android:paddingLeft="0px"
android:paddingTop="0px"
android:paddingEnd="0px"
android:paddingRight="0px"
android:paddingBottom="0px"
android:text="M"
android:textSize="8sp"
tools:ignore="HardcodedText,PxUsage,SmallSp" />
<Button
android:id="@+id/button_right_click"
android:layout_width="64px"
android:layout_height="64px"
android:minWidth="44dip"
android:minHeight="22dip"
android:padding="0px"
android:paddingStart="0px"
android:paddingLeft="0px"
android:paddingTop="0px"
android:paddingEnd="0px"
android:paddingRight="0px"
android:paddingBottom="0px"
android:text="R"
android:textSize="8sp"
tools:ignore="HardcodedText,PxUsage,SmallSp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/mouse_buttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:layout_marginBottom="80dp"
android:orientation="vertical"
android:alpha="0.7"
android:translationX="0px"
android:translationY="0px">
<LinearLayout
android:id="@+id/mouse_buttons_secondary_layer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:visibility="visible">
<Button
android:id="@+id/mouse_button_left_click"
android:layout_width="96dp"
android:layout_height="48dp"
android:minWidth="48dp"
android:minHeight="48dp"
android:padding="0px"
android:paddingStart="0px"
android:paddingLeft="0px"
android:paddingTop="0px"
android:paddingEnd="0px"
android:paddingRight="0px"
android:paddingBottom="0px"
android:text="L"
android:textColor="@android:color/black"
android:background="@drawable/mouse_buttons"
android:textSize="8sp"
tools:ignore="HardcodedText,PxUsage,SmallSp" />
<Button
android:id="@+id/mouse_button_middle_click"
android:layout_width="48dp"
android:layout_height="48dp"
android:minWidth="48dp"
android:minHeight="48dp"
android:padding="0px"
android:paddingStart="0px"
android:paddingLeft="0px"
android:paddingTop="0px"
android:paddingEnd="0px"
android:paddingRight="0px"
android:paddingBottom="0px"
android:text="M"
android:textColor="@android:color/black"
android:background="@drawable/mouse_buttons"
android:textSize="8sp"
tools:ignore="HardcodedText,PxUsage,SmallSp" />
<Button
android:id="@+id/mouse_button_right_click"
android:layout_width="96dp"
android:layout_height="48dp"
android:minWidth="48dp"
android:minHeight="48dp"
android:padding="0px"
android:paddingStart="0px"
android:paddingLeft="0px"
android:paddingTop="0px"
android:paddingEnd="0px"
android:paddingRight="0px"
android:paddingBottom="0px"
android:text="R"
android:textColor="@android:color/black"
android:background="@drawable/mouse_buttons"
android:textSize="8sp"
tools:ignore="HardcodedText,PxUsage,SmallSp" />
</LinearLayout>
<ImageButton
android:id="@+id/mouse_buttons_position"
android:layout_width="40dp"
android:layout_height="40dp"
android:minWidth="40dp"
android:minHeight="40dp"
android:adjustViewBounds="true"
android:padding="2dp"
android:scaleType="fitCenter"
android:src="@android:drawable/ic_menu_mylocation"
android:contentDescription="MOVE"
android:layout_gravity="center"
android:background="@drawable/mouse_buttons"
tools:ignore="HardcodedText,PxUsage,SmallSp" />
</LinearLayout>
<androidx.viewpager.widget.ViewPager
android:id="@+id/terminal_toolbar_view_pager"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="37.5dp"
android:background="@android:color/black"
android:layout_gravity="bottom|center"/>
<View
android:id="@+id/activity_termux_bottom_space_view"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/transparent"
android:layout_gravity="bottom|center" />
</FrameLayout>

View File

@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- Based on Android Support library code, only added Divider view and onClick action here -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:gravity="center_vertical"
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingRight="?android:attr/listPreferredItemPaddingRight"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:background="@android:color/transparent"
android:clipToPadding="false"
android:baselineAligned="false">
<include layout="@layout/image_frame"/>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:onClick="onClick"
android:background="?android:attr/selectableItemBackground">
<TextView
android:id="@android:id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceListItem"
android:ellipsize="marquee"/>
<TextView
android:id="@android:id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@android:id/title"
android:layout_alignLeft="@android:id/title"
android:layout_alignStart="@android:id/title"
android:layout_gravity="start"
android:textAlignment="viewStart"
android:textColor="?android:attr/textColorSecondary"
android:maxLines="10"
style="@style/PreferenceSummaryTextStyle"/>
<ImageButton
android:id="@+id/button"
android:layout_width="64dp"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_settings"
android:clickable="false"
android:background="@android:color/transparent" />
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical">
<View
android:layout_width="1dp"
android:layout_height="0dp"
android:layout_weight="2"
android:background="@android:color/transparent" />
<View
android:layout_width="1dp"
android:layout_height="0dp"
android:layout_weight="6"
android:background="?android:attr/listDivider" />
<View
android:layout_width="1dp"
android:layout_height="0dp"
android:layout_weight="2"
android:background="@android:color/transparent" />
</LinearLayout>
<!-- Preference should place its actual preference widget here. -->
<LinearLayout
android:id="@android:id/widget_frame"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="end|center_vertical"
android:paddingLeft="16dp"
android:paddingStart="16dp"
android:paddingRight="0dp"
android:paddingEnd="0dp"
android:orientation="vertical"
android:background="?android:attr/selectableItemBackground"/>
</LinearLayout>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<com.termux.shared.termux.extrakeys.ExtraKeysView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/terminal_toolbar_extra_keys"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:orientation="horizontal" />

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<Button
android:id="@+id/terminal_toolbar_back_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="←"
tools:ignore="HardcodedText" />
<EditText
android:id="@+id/terminal_toolbar_text_input"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:imeOptions="actionSend|flagNoFullscreen"
android:maxLines="1"
android:inputType="text"
android:importantForAutofill="no"
android:textColor="@android:color/white"
android:textColorHighlight="@android:color/darker_gray"
android:paddingTop="0dp"
android:textCursorDrawable="@null"
android:paddingBottom="0dp"
tools:ignore="LabelFor" />
</LinearLayout>

View File

@@ -195,4 +195,112 @@
<string name="msg_button_up_delay_help">在某些罕见的情况下,如果应用程序无法响应点击,延迟点击事件会有所帮助。</string>
<string name="pref_long_press_swipe">长按轻扫</string>
<string name="pref_auto_reconnect">自动重连</string>
<string name="extra_keys_config_desc">你可以像在 Termux 应用中一样设置小键盘的值,(参考 <a href="http://wiki.termux.com/wiki/Touch_Keyboard#Extra_Keys_Row">这里</a>)以及更多功能 \n
例如:<b>META</b> 表示 <i>META 键</i>\n
<b>KEYBOARD</b> 表示 <i>软键盘切换键</i>\n
<b>PREFERENCES</b> 表示 <i>偏好设置打开键</i>\n
<b>MOUSE_HELPER</b> 表示 <i>鼠标助手切换键</i>\n
<b>STYLUS_HELPER</b> 表示 <i>手写笔点击覆盖层切换键</i>\n
<b>EXIT</b> 表示 <i>应用退出键</i></string>
<string name="notification_content_text">下拉以显示选项</string>
<string name="notification_open_preferences">偏好设置</string>
<string name="notification_exit">退出</string>
<string name="notification_restart_activity">重启</string>
<string name="notification_toggle_soft_keyboard">切换软键盘</string>
<string name="notification_toggle_additional_key_bar">切换小键盘</string>
<string name="notification_release_pointer_and_keyboard_capture">释放捕获</string>
<string name="notification_toggle_fullscreen">切换全屏</string>
<string name="pref_main">Termux X11偏好设置</string>
<string name="pref_output">输出</string>
<string name="pref_pointer">鼠标指针</string>
<string name="pref_kbd">键盘</string>
<string name="pref_other">其他</string>
<string name="pref_ekbar">小键盘偏好设置</string>
<string name="pref_userActions">对用户操作的响应</string>
<string name="pref_displayResolutionMode">显示分辨率模式</string>
<string name="pref_displayScale">显示缩放百分比</string>
<string name="pref_displayResolutionExact">显示分辨率</string>
<string name="pref_displayResolutionCustom">自定义显示分辨率</string>
<string name="pref_adjustResolution">调整设定的分辨率以适应屏幕方向</string>
<string name="pref_displayStretch">拉伸以适应显示</string>
<string name="pref_Reseed">在软键盘打开时重新调整屏幕</string>
<string name="pref_Reseed_summary">在软键盘打开时,屏幕大小将被调整。</string>
<string name="pref_PIP">画中画模式</string>
<string name="pref_PIP_summary">按下主页按钮或最近任务按钮时以画中画模式显示应用</string>
<!-- <string name="pref_fullscreen">全屏</string> -->
<string name="pref_fullscreen_summary">在设备显示中切换沉浸模式</string>
<string name="pref_forceOrientation">屏幕方向</string>
<string name="pref_hideCutout">异形屏全屏</string>
<string name="pref_keepScreenOn">保持屏幕常亮</string>
<string name="pref_touchMode">触摸屏输入模式</string>
<string name="pref_scaleTouchpad">将显示缩放百分比应用于触控板</string>
<string name="pref_showStylusClickOverride">显示手写笔点击选项</string>
<string name="pref_showStylusClickOverride_summary">手写笔触摸覆盖,左、中或右键点击(仅限手写笔)</string>
<string name="pref_stylusIsMouse">启用手写笔鼠标模式</string>
<string name="pref_stylusIsMouse_summary">使手写笔像鼠标一样工作。启用后,手写笔将仅移动光标并发送鼠标点击,忽略压力、角度和倾斜。</string>
<string name="pref_stylusButtonContactModifierMode">手写笔按钮接触修饰模式</string>
<string name="pref_stylusButtonContactModifierMode_summary">启用此选项以仅在手写笔按下按钮时触摸屏幕时发送右键或中键鼠标点击。</string>
<string name="pref_showMouseHelper">显示鼠标点击助手覆盖层</string>
<string name="pref_showMouseHelper_summary">屏幕上的鼠标按钮可与触控板配合使用</string>
<string name="pref_pointerCapture">捕获外接鼠标</string>
<string name="pref_pointerCapture_summary">拦截所有硬件指针事件。按下 Escape 键后,指针返回 Android。</string>
<string name="pref_transformCapturedPointer">外接鼠标移动速度</string>
<string name="pref_capturedPointerSpeedFactor">捕获指针速度因子百分比</string>
<string name="pref_tapToMove">启用触控板的点击移动</string>
<string name="pref_showAdditionalKbd">显示小键盘</string>
<string name="pref_showAdditionalKbd_summary">显示带有额外键的键盘。</string>
<string name="pref_showIMEWhileExternalConnected">外接键盘时显示软键盘</string>
<string name="pref_showIMEWhileExternalConnected_summary">在硬件键盘连接时显示软件键盘。</string>
<string name="pref_preferScancodes">优先使用扫描码</string>
<string name="pref_preferScancodes_summary">让 XServer 处理硬件键盘布局(使用桌面环境设置或 setxkbmap</string>
<string name="pref_hardwareKbdScancodesWorkaround">硬件键盘扫描码解决方案</string>
<string name="pref_hardwareKbdScancodesWorkaround_summary">修复某些设备上的扫描码。可能会导致多个布局出现问题。</string>
<string name="pref_dexMetaKeyCapture">拦截系统快捷键</string>
<string name="pref_dexMetaKeyCapture_summary">仅限三星 Dex。允许拦截“Alt+F4”、“Meta+D”、“Meta+E”等。</string>
<string name="pref_enableAccessibilityService">启用无障碍服务以手动拦截系统快捷键。</string>
<string name="pref_enableAccessibilityService_summary">打开无障碍设置。</string>
<string name="pref_enableAccessibilityServiceAutomatically">启用无障碍服务以自动拦截系统快捷键。</string>
<string name="pref_enableAccessibilityServiceAutomatically_summary">需要 WRITE_SECURE_SETTINGS 权限。</string>
<string name="pref_pauseKeyInterceptingWithEsc">使用 Esc 键暂停键盘拦截</string>
<string name="pref_filterOutWinkey">过滤拦截的 WinMeta/Mod4键。</string>
<string name="pref_filterOutWinkey_summary">允许您在拦截时使用 Dex 快捷键。需要无障碍服务才能工作。</string>
<string name="pref_enableGboardCJK">启用中日韩谷歌输入法的解决方案</string>
<string name="pref_enableGboardCJK_summary">可能需要 Android 14 和 Gboard 14</string>
<string name="pref_clipboardEnable">剪贴板共享</string>
<string name="pref_requestNotificationPermission">请求通知权限</string>
<string name="pref_xrMode">Meta Oculus XR 模式</string>
<string name="pref_configureResponseToUserActions">配置对用户操作的响应</string>
<string name="pref_storeSecondaryDisplayPreferencesSeparately">分开存储副显示器的偏好设置</string>
<string name="pref_storeSecondaryDisplayPreferencesSeparately_summary">在您想要配置的显示器上打开此屏幕</string>
<string name="pref_adjustHeightForEK">为小键盘调整显示高度</string>
<string name="pref_adjustHeightForEK_summary">在切换小键盘时可能导致屏幕闪烁。</string>
<string name="pref_useTermuxEKBarBehaviour">每次按键后停用小键盘上的特殊键</string>
<string name="pref_useTermuxEKBarBehaviour_summary">使用长按来锁定特殊键</string>
<string name="pref_opacityEKBar">小键盘的不透明度百分比</string>
<string name="pref_extra_keys_config">小键盘配置</string>
<string name="pref_swipeUpAction">三指向上滑动</string>
<string name="pref_swipeDownAction">三指向下滑动</string>
<string name="pref_volumeUpAction">音量增</string>
<string name="pref_volumeDownAction">音量减</string>
<string name="pref_backButtonAction">返回按钮</string>
<string name="pref_notificationTapAction">通知栏点击</string>
<string name="pref_notificationButton0Action">通知栏第一个按钮</string>
<string name="pref_notificationButton1Action">通知栏第二个按钮</string>
<string name="pref_summary_requiresExactOrCustom">需要“显示分辨率模式”设置为“exact”或“custom”</string>
<string name="pref_summary_requiresIntercepting">需要使用 Dex 模式或无障碍服务拦截系统快捷键</string>
<string name="pref_summary_requiresTrackpadAndNative">需要“触摸屏输入模式”设置为“Trackpad”并且“显示分辨率模式”不能为“native”</string>
</resources>

View File

@@ -192,4 +192,87 @@
<item>Item 2</item>
<item>Item 3</item>
</string-array>
<!--Termux X11-->
<string-array name="touchscreenInputModesEntries">
<item>Trackpad</item>
<item>Simulated touchscreen</item>
<item>Direct touch</item>
</string-array>
<string-array name="touchscreenInputModesValues">
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
<string-array name="transformCapturedPointerEntries">
<item>No</item>
<item>Clockwise</item>
<item>Counter clockwise</item>
<item>Upside down</item>
<item>Automatic (for touchpad)</item>
</string-array>
<string-array name="transformCapturedPointerValues">
<item>no</item>
<item>c</item>
<item>cc</item>
<item>ud</item>
<item>at</item>
</string-array>
<string-array name="displayResolutionVariants">
<item>native</item>
<item>scaled</item>
<item>exact</item>
<item>custom</item>
</string-array>
<string-array name="displayResolution">
<item>320x200</item>
<item>320x240</item>
<item>352x288</item>
<item>400x240</item>
<item>640x350</item>
<item>640x480</item>
<item>800x480</item>
<item>800x600</item>
<item>1024x768</item>
<item>1280x720</item>
<item>1280x960</item>
<item>1280x1024</item>
<item>1400x1050</item>
<item>1600x1024</item>
<item>1600x1200</item>
<item>1366x768</item>
<item>1680x1050</item>
<item>1920x1080</item>
<item>1920x1200</item>
<item>2048x1536</item>
<item>2560x1600</item>
<item>2560x2048</item>
<item>3840x2160</item>
<item>7680x4320</item>
</string-array>
<string-array name="userActionsValues">
<item>no action</item>
<item>toggle soft keyboard</item>
<item>toggle additional key bar</item>
<item>open preferences</item>
<item>release pointer and keyboard capture</item>
<item>toggle fullscreen</item>
<item>restart activity</item>
<item>exit</item>
</string-array>
<string-array name="userActionsVolumeDownValues">
<item>@array/userActionsValues</item>
<item>send volume down</item>
</string-array>
<string-array name="userActionsVolumeUpValues">
<item>@array/userActionsValues</item>
<item>send volume up</item>
</string-array>
<string-array name="forceOrientationVariants">
<item>auto</item>
<item>portrait</item>
<item>landscape</item>
<item>reverse portrait</item>
<item>reverse landscape</item>
</string-array>
</resources>

View File

@@ -7,7 +7,7 @@
-->
<resources>
<string name="app_name" translatable="false">AVNC</string>
<string name="avnc_app_name" translatable="false">AVNC</string>
<string name="title_add_server_profile">Add server</string>
<string name="title_edit_server_profile">Edit server</string>
@@ -215,4 +215,113 @@
<string name="pref_keycode_map">Keycode map</string>
<string name="pref_touch_test">Touch test</string>
<string name="pref_key_test">Key test</string>
<string name="app_name">小小电脑-Termux X11页面</string>
<string name="not_connected">未连接</string>
<string name="preferences_button_text">   Termux X11偏好设置   </string>
<string name="help_button_text">   Termux X11帮助   </string>
<string name="exit_button_text">   返回终端   </string>
<string name="extra_keys_config_desc">Here you can set value of extra-keys variable like in Termux app (read <a href="http://wiki.termux.com/wiki/Touch_Keyboard#Extra_Keys_Row">this</a>) and more \n
E.g. <b>META</b> for <i>META key</i>, \n
<b>KEYBOARD</b> for <i>soft keyboard toggling key</i>, \n
<b>PREFERENCES</b> for <i>preferences opening key</i>, \n
<b>MOUSE_HELPER</b> for <i>mouse helper toggling key</i>, \n
<b>STYLUS_HELPER</b> for <i>stylus click override overlay toggling key</i>, \n
<b>EXIT</b> for <i>application exit key</i>.</string>
<string name="notification_content_text">Pull down to show options</string>
<string name="notification_open_preferences">Preferences</string>
<string name="notification_exit">Exit</string>
<string name="notification_restart_activity">Restart</string>
<string name="notification_toggle_soft_keyboard">Toggle IME</string>
<string name="notification_toggle_additional_key_bar">Toggle additional keyboard</string>
<string name="notification_release_pointer_and_keyboard_capture">Release captures</string>
<string name="notification_toggle_fullscreen">Toggle fullscreen</string>
<string name="pref_main">Preferences</string>
<string name="pref_output">Output</string>
<string name="pref_pointer">Pointer</string>
<string name="pref_kbd">Keyboard</string>
<string name="pref_other">Other</string>
<string name="pref_ekbar">Extra key bar preferences</string>
<string name="pref_userActions">Response to user actions</string>
<string name="pref_displayResolutionMode">Display resolution mode</string>
<string name="pref_displayScale">Display scale, %</string>
<string name="pref_displayResolutionExact">Display resolution</string>
<string name="pref_displayResolutionCustom">Display resolution</string>
<string name="pref_adjustResolution">Adjust the set resolution to fit screen orientation</string>
<string name="pref_displayStretch">Stretch to fit display</string>
<string name="pref_Reseed">Reseed screen while soft keyboard is open</string>
<string name="pref_Reseed_summary">The screen size will be adjusted while Soft Keyboard is open.</string>
<string name="pref_PIP">PIP mode</string>
<string name="pref_PIP_summary">Show app in picture-in-picture mode when home button or recents button is pressed</string>
<!-- <string name="pref_fullscreen">Fullscreen</string> -->
<string name="pref_fullscreen_summary">Toggle immersive mode in your device display</string>
<string name="pref_forceOrientation">Screen orientation</string>
<string name="pref_hideCutout">Hide display cutout (if any)</string>
<string name="pref_keepScreenOn">Keep Screen On</string>
<string name="pref_touchMode">Touchscreen input mode</string>
<string name="pref_scaleTouchpad">Apply display scale factor to touchpad</string>
<string name="pref_showStylusClickOverride">Show stylus click options</string>
<string name="pref_showStylusClickOverride_summary">Stylus touch override, left, middle or right click (stylus only)</string>
<string name="pref_stylusIsMouse">Enable stylus mouse mode</string>
<string name="pref_stylusIsMouse_summary">Make your stylus work like a mouse. When activated, stylus will only move the cursor and send mouse clicks, ignoring pressure, angle, and tilt.</string>
<string name="pref_stylusButtonContactModifierMode">Stylus button contact modifier mode</string>
<string name="pref_stylusButtonContactModifierMode_summary">Enable this option to send right or middle mouse buttons only when stylus touches the screen while the button is pressed.</string>
<string name="pref_showMouseHelper">Show mouse click helper overlay</string>
<string name="pref_showMouseHelper_summary">Onscreen mouse buttons usable with touchpad</string>
<string name="pref_pointerCapture">Capture external pointer devices when possible</string>
<string name="pref_pointerCapture_summary">Intercept all hardware pointer events. Pointer is back to Android after pressing Escape key.</string>
<string name="pref_transformCapturedPointer">Transform captured pointer movements</string>
<string name="pref_capturedPointerSpeedFactor">Captured pointer speed factor, %</string>
<string name="pref_tapToMove">Enable tap-to-move for touchpads</string>
<string name="pref_showAdditionalKbd">Show additional keyboard</string>
<string name="pref_showAdditionalKbd_summary">Show keyboard with additional keys.</string>
<string name="pref_showIMEWhileExternalConnected">Show IME with external keyboard</string>
<string name="pref_showIMEWhileExternalConnected_summary">Show software keyboard while hardware keyboard is connected.</string>
<string name="pref_preferScancodes">Prefer scancodes when possible</string>
<string name="pref_preferScancodes_summary">Let X server handle hardware keyboard layout (with DE settings or setxkbmap).</string>
<string name="pref_hardwareKbdScancodesWorkaround">Hardware keyboard scancodes workaround</string>
<string name="pref_hardwareKbdScancodesWorkaround_summary">Fixes scancodes on some devices. Might cause problems with multiple layouts.</string>
<string name="pref_dexMetaKeyCapture">Intercept system shortcuts</string>
<string name="pref_dexMetaKeyCapture_summary">Samsung Dex only. Allows interception of &quot;Alt+F4&quot;, &quot;Meta+D&quot;, &quot;Meta+E&quot;, etc.</string>
<string name="pref_enableAccessibilityService">Enable Accessibility service for intercepting system shortcuts manually.</string>
<string name="pref_enableAccessibilityService_summary">Open Accessibility settings.</string>
<string name="pref_enableAccessibilityServiceAutomatically">Enable Accessibility service for intercepting system shortcuts automatically.</string>
<string name="pref_enableAccessibilityServiceAutomatically_summary">Requires WRITE_SECURE_SETTINGS permission.</string>
<string name="pref_pauseKeyInterceptingWithEsc">Pause key intercepting with Esc key</string>
<string name="pref_filterOutWinkey">Filter out intercepted Win (Meta/Mod4) key.</string>
<string name="pref_filterOutWinkey_summary">Allows you to use Dex shortcuts while intercepting. Requires Accessibility service to work.</string>
<string name="pref_enableGboardCJK">Workaround to enable CJK Gboard</string>
<string name="pref_enableGboardCJK_summary">May require Android 14 and Gboard 14</string>
<string name="pref_clipboardEnable">Clipboard sharing</string>
<string name="pref_requestNotificationPermission">Request notification permission</string>
<string name="pref_xrMode">Meta Oculus XR mode</string>
<string name="pref_configureResponseToUserActions">Configure response to user actions</string>
<string name="pref_storeSecondaryDisplayPreferencesSeparately">Store preferences for secondary displays separately</string>
<string name="pref_storeSecondaryDisplayPreferencesSeparately_summary">Open this screen on display you want to configure</string>
<string name="pref_adjustHeightForEK">Adjust display height for extra keys bar</string>
<string name="pref_adjustHeightForEK_summary">May cause screen flickering during toggling EK bar.</string>
<string name="pref_useTermuxEKBarBehaviour">Deactivate special keys on additional key bar after each keypress</string>
<string name="pref_useTermuxEKBarBehaviour_summary">Use long-tap to lock special keys</string>
<string name="pref_opacityEKBar">Opacity of extra keys bar, %</string>
<string name="pref_extra_keys_config">Extra keys config</string>
<string name="pref_swipeUpAction">Three finger swipe up</string>
<string name="pref_swipeDownAction">Three finger swipe down</string>
<string name="pref_volumeUpAction">Volume up</string>
<string name="pref_volumeDownAction">Volume down</string>
<string name="pref_backButtonAction">Back button</string>
<string name="pref_notificationTapAction">Notification tap</string>
<string name="pref_notificationButton0Action">Notification first button</string>
<string name="pref_notificationButton1Action">Notification second button</string>
<string name="pref_summary_requiresExactOrCustom">Requires "display resolution mode" to be "exact" or "custom"</string>
<string name="pref_summary_requiresIntercepting">Requires intercepting system shortcuts with Dex mode or with Accessibility service</string>
<string name="pref_summary_requiresTrackpadAndNative">Requires "Touchscreen input mode" to be "Trackpad" and "Display resolution mode" to be not "native"</string>
</resources>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<accessibility-service
xmlns:android="http://schemas.android.com/apk/res/android"
android:accessibilityEventTypes=""
android:accessibilityFlags=""
android:canRetrieveWindowContent="false"
android:settingsActivity=".LoriePreferences"
android:packageNames="@null"
android:canRequestFilterKeyEvents="true" />

View File

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen app:key="main" app:title="@string/pref_main">
<Preference app:title="@string/pref_output" app:fragment="output" />
<Preference app:title="@string/pref_pointer" app:fragment="pointer" />
<Preference app:title="@string/pref_kbd" app:fragment="kbd" />
<Preference app:title="@string/pref_other" app:fragment="other" />
</PreferenceScreen>
<PreferenceScreen app:key="output">
<ListPreference app:key="displayResolutionMode" app:defaultValue="native" app:entries="@array/displayResolutionVariants" app:entryValues="@array/displayResolutionVariants" />
<SeekBarPreference app:key="displayScale" app:defaultValue="100" app:min="30" android:max="300" app:seekBarIncrement="10" app:showSeekBarValue="true" app:updatesContinuously="true" />
<ListPreference app:key="displayResolutionExact" app:defaultValue="1280x1024" app:entries="@array/displayResolution" app:entryValues="@array/displayResolution" tools:ignore="DuplicateSpeakableTextCheck" />
<EditTextPreference app:key="displayResolutionCustom" app:defaultValue="1280x1024" app:useSimpleSummaryProvider="true" />
<SwitchPreferenceCompat app:key="adjustResolution" app:defaultValue="false" />
<SwitchPreferenceCompat app:key="displayStretch" app:defaultValue="false" />
<SwitchPreferenceCompat app:key="Reseed" app:defaultValue="true" />
<SwitchPreferenceCompat app:key="PIP" app:defaultValue="true" />
<SwitchPreferenceCompat app:key="fullscreen" app:defaultValue="true" />
<ListPreference app:key="forceOrientation" app:defaultValue="no" app:entries="@array/forceOrientationVariants" app:entryValues="@array/forceOrientationVariants" />
<SwitchPreferenceCompat app:key="hideCutout" app:defaultValue="false" />
<SwitchPreferenceCompat app:defaultValue="true" app:key="keepScreenOn" />
<SwitchPreferenceCompat app:key="xrMode" app:defaultValue="false" />
</PreferenceScreen>
<PreferenceScreen app:key="pointer">
<ListPreference app:key="touchMode" app:defaultValue="1" app:entries="@array/touchscreenInputModesEntries" app:entryValues="@array/touchscreenInputModesValues" />
<SwitchPreferenceCompat app:key="scaleTouchpad" app:defaultValue="true" />
<SwitchPreferenceCompat app:key="showStylusClickOverride" app:defaultValue="false" />
<SwitchPreferenceCompat app:key="stylusIsMouse" app:defaultValue="false" />
<SwitchPreferenceCompat app:key="stylusButtonContactModifierMode" app:defaultValue="false" />
<SwitchPreferenceCompat app:key="showMouseHelper" app:defaultValue="false" />
<SwitchPreferenceCompat app:key="pointerCapture" app:defaultValue="false" />
<ListPreference app:key="transformCapturedPointer" app:defaultValue="no" app:entries="@array/transformCapturedPointerEntries" app:entryValues="@array/transformCapturedPointerValues" />
<SeekBarPreference app:key="capturedPointerSpeedFactor" app:defaultValue="100" app:min="1" android:max="200" app:seekBarIncrement="1" app:showSeekBarValue="true" app:updatesContinuously="true" />
<SwitchPreferenceCompat app:key="tapToMove" app:defaultValue="true" />
</PreferenceScreen>
<PreferenceScreen app:key="kbd">
<SwitchPreferenceCompat app:key="showAdditionalKbd" app:defaultValue="true" />
<!-- this preference should be a part of `Prefs` but should not appear in PreferenceScreen -->
<SwitchPreferenceCompat app:key="additionalKbdVisible" app:defaultValue="true" app:isPreferenceVisible="false" />
<SwitchPreferenceCompat app:key="showIMEWhileExternalConnected" app:defaultValue="true" />
<SwitchPreferenceCompat app:key="preferScancodes" app:defaultValue="false" />
<SwitchPreferenceCompat app:key="hardwareKbdScancodesWorkaround" app:defaultValue="true" />
<SwitchPreferenceCompat app:key="dexMetaKeyCapture" app:defaultValue="false" />
<Preference app:key="enableAccessibilityService">
<intent android:action="android.settings.ACCESSIBILITY_SETTINGS"/>
</Preference>
<SwitchPreferenceCompat app:key="enableAccessibilityServiceAutomatically" app:defaultValue="false" />
<SwitchPreferenceCompat app:key="pauseKeyInterceptingWithEsc" app:defaultValue="false" />
<SwitchPreferenceCompat app:key="filterOutWinkey" app:defaultValue="false" />
<SwitchPreferenceCompat app:key="enableGboardCJK" app:defaultValue="false" />
</PreferenceScreen>
<PreferenceScreen app:key="other">
<SwitchPreferenceCompat app:key="clipboardEnable" app:defaultValue="true" />
<Preference app:key="requestNotificationPermission" />
<Preference app:key="configureResponseToUserActions" app:fragment="userActions" />
<SwitchPreferenceCompat app:key="storeSecondaryDisplayPreferencesSeparately" app:defaultValue="false" />
</PreferenceScreen>
<PreferenceScreen app:key="ekbar">
<SwitchPreferenceCompat app:key="adjustHeightForEK" app:defaultValue="true" />
<SwitchPreferenceCompat app:key="useTermuxEKBarBehaviour" app:defaultValue="true" />
<SeekBarPreference app:key="opacityEKBar" app:defaultValue="100" app:min="1" android:max="100" app:seekBarIncrement="1" app:showSeekBarValue="true" app:updatesContinuously="true" />
<EditTextPreference app:key="extra_keys_config" />
</PreferenceScreen>
<PreferenceScreen app:key="userActions">
<ListPreference app:key="swipeUpAction" app:defaultValue="no action" app:entries="@array/userActionsValues" app:entryValues="@array/userActionsValues" />
<ListPreference app:key="swipeDownAction" app:defaultValue="toggle additional key bar" app:entries="@array/userActionsValues" app:entryValues="@array/userActionsValues" />
<ListPreference app:key="volumeUpAction" app:defaultValue="no action" app:entries="@array/userActionsVolumeUpValues" app:entryValues="@array/userActionsVolumeUpValues" />
<ListPreference app:key="volumeDownAction" app:defaultValue="no action" app:entries="@array/userActionsVolumeDownValues" app:entryValues="@array/userActionsVolumeDownValues" />
<ListPreference app:key="backButtonAction" app:defaultValue="toggle additional key bar" app:entries="@array/userActionsValues" app:entryValues="@array/userActionsValues" />
<ListPreference app:key="notificationTapAction" app:defaultValue="open preferences" app:entries="@array/userActionsValues" app:entryValues="@array/userActionsValues" />
<ListPreference app:key="notificationButton0Action" app:defaultValue="open preferences" app:entries="@array/userActionsValues" app:entryValues="@array/userActionsValues" />
<ListPreference app:key="notificationButton1Action" app:defaultValue="exit" app:entries="@array/userActionsValues" app:entryValues="@array/userActionsValues" />
</PreferenceScreen>
</PreferenceScreen>