这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/src/main/java/com/termux/x11/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

if (didRequestLaunchExternalDisplay()) {
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
if (didRequestLaunchExternalDisplay() || preferences.getBoolean("fullscreen", true)) {
setFullScreenForExternalDisplay();
}

Expand Down Expand Up @@ -72,7 +73,8 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
public void setTheme(int resId) {
// for some reason, calling setTheme() in onCreate() wasn't working.
super.setTheme(didRequestLaunchExternalDisplay() ?
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
super.setTheme(didRequestLaunchExternalDisplay() || preferences.getBoolean("fullscreen", true) ?
R.style.FullScreen_ExternalDisplay : R.style.NoActionBar);
}

Expand Down
19 changes: 12 additions & 7 deletions app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<CheckBoxPreference

<CheckBoxPreference
android:title="Show additional keyboard"
android:defaultValue="true"
android:summary="Show keyboard with additional keys."
Expand Down Expand Up @@ -32,11 +32,16 @@
android:key="PIP"
android:summary="Show app in picture-in-picture mode when home button or recents button is pressed" />

<CheckBoxPreference
android:defaultValue="false"
android:key="fullscreen"
android:summary="Toggles immersive mode in your device display"
android:title="Fullscreen on device display" />
<EditTextPreference
android:title="Custom XDG_RUNTIME_DIR"
android:defaultValue="/data/data/com.termux/files/usr/tmp"
android:key="CustXDG"
android:summary="Set the XDG runtime directory for wayland sockets"
android:dialogMessage="Changes to this preference will apply on app restart" />
android:title="Custom XDG_RUNTIME_DIR"
android:defaultValue="/data/data/com.termux/files/usr/tmp"
android:key="CustXDG"
android:summary="Set the XDG runtime directory for wayland sockets"
android:dialogMessage="Changes to this preference will apply on app restart" />

</PreferenceScreen>