summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2024-09-18 10:08:26 +0800
committerPo Lu <luangruo@yahoo.com>2024-09-18 10:11:15 +0800
commiteace68a325b96d12188ea8d673f30bad1354b916 (patch)
treefb508ee0a9f7f7a044a573ef68af61974971e1b1 /java
parent50deb59aaee2a8d773e95a53c91da7bdb2c5cabd (diff)
Fix layout of preferences activity on Android 35
* java/org/gnu/emacs/EmacsPreferencesActivity.java (onCreate): Align list view to system windows.
Diffstat (limited to 'java')
-rw-r--r--java/org/gnu/emacs/EmacsPreferencesActivity.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/java/org/gnu/emacs/EmacsPreferencesActivity.java b/java/org/gnu/emacs/EmacsPreferencesActivity.java
index a3edd6388b4..128d0b22658 100644
--- a/java/org/gnu/emacs/EmacsPreferencesActivity.java
+++ b/java/org/gnu/emacs/EmacsPreferencesActivity.java
@@ -28,6 +28,8 @@ import android.content.Intent;
import android.os.Bundle;
import android.os.Build;
+import android.view.View;
+
import android.widget.Toast;
import android.preference.*;
@@ -115,6 +117,7 @@ public class EmacsPreferencesActivity extends PreferenceActivity
{
Preference tem;
Preference.OnPreferenceClickListener listener;
+ View view;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
setTheme (android.R.style.Theme_DeviceDefault_Settings);
@@ -167,5 +170,13 @@ public class EmacsPreferencesActivity extends PreferenceActivity
};
tem.setOnPreferenceClickListener (listener);
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM)
+ {
+ /* Align the list view to system windows, or they will be
+ obstructed by the title bar. */
+ view = this.getListView ();
+ view.setFitsSystemWindows (true);
+ }
}
};