1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

Fix layout of preferences activity on Android 35

* java/org/gnu/emacs/EmacsPreferencesActivity.java (onCreate):
Align list view to system windows.
This commit is contained in:
Po Lu 2024-09-18 10:08:26 +08:00
parent 50deb59aae
commit eace68a325

View File

@ -28,6 +28,8 @@
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 @@ else if (Build.VERSION.SDK_INT
};
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);
}
}
};