diff options
| author | Po Lu | 2023-03-01 14:31:57 +0800 |
|---|---|---|
| committer | Po Lu | 2023-03-01 14:31:57 +0800 |
| commit | 194b3f948cba9f6da0e5d3b36ada8ab9ca74d482 (patch) | |
| tree | d9e2666749814376edfcd1f1f1e6818f597a5dc6 /java | |
| parent | 15bcb446be2f2f5b85a1b9585ec3abaabcbf04d9 (diff) | |
| download | emacs-194b3f948cba9f6da0e5d3b36ada8ab9ca74d482.tar.gz emacs-194b3f948cba9f6da0e5d3b36ada8ab9ca74d482.zip | |
Update Android port
* java/AndroidManifest.xml.in: Specify @style/EmacsStyle.
* java/org/gnu/emacs/EmacsActivity.java (onCreate): Stop setting
the theme here.
* java/res/values-v11/style.xml:
* java/res/values-v14/style.xml:
* java/res/values-v29/style.xml:
* java/res/values/style.xml: Extract style resources into
res/values.
Diffstat (limited to 'java')
| -rw-r--r-- | java/AndroidManifest.xml.in | 2 | ||||
| -rw-r--r-- | java/org/gnu/emacs/EmacsActivity.java | 7 | ||||
| -rw-r--r-- | java/res/values-v11/style.xml | 23 | ||||
| -rw-r--r-- | java/res/values-v14/style.xml | 24 | ||||
| -rw-r--r-- | java/res/values-v29/style.xml | 30 | ||||
| -rw-r--r-- | java/res/values/style.xml | 25 |
6 files changed, 103 insertions, 8 deletions
diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in index 1da3646e2f5..4ebfe470c0a 100644 --- a/java/AndroidManifest.xml.in +++ b/java/AndroidManifest.xml.in | |||
| @@ -67,7 +67,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. --> | |||
| 67 | android:icon="@drawable/emacs" | 67 | android:icon="@drawable/emacs" |
| 68 | android:hardwareAccelerated="true" | 68 | android:hardwareAccelerated="true" |
| 69 | android:supportsRtl="true" | 69 | android:supportsRtl="true" |
| 70 | android:theme="@android:style/Theme" | 70 | android:theme="@style/EmacsStyle" |
| 71 | android:debuggable="@ANDROID_DEBUGGABLE@" | 71 | android:debuggable="@ANDROID_DEBUGGABLE@" |
| 72 | android:extractNativeLibs="true"> | 72 | android:extractNativeLibs="true"> |
| 73 | 73 | ||
diff --git a/java/org/gnu/emacs/EmacsActivity.java b/java/org/gnu/emacs/EmacsActivity.java index 0ee8c239899..1c5d7605caa 100644 --- a/java/org/gnu/emacs/EmacsActivity.java +++ b/java/org/gnu/emacs/EmacsActivity.java | |||
| @@ -187,13 +187,6 @@ public class EmacsActivity extends Activity | |||
| 187 | = intent.getBooleanExtra ("org.gnu.emacs.START_DASH_Q", | 187 | = intent.getBooleanExtra ("org.gnu.emacs.START_DASH_Q", |
| 188 | false); | 188 | false); |
| 189 | 189 | ||
| 190 | /* Set the theme to one without a title bar. */ | ||
| 191 | |||
| 192 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) | ||
| 193 | setTheme (android.R.style.Theme_DeviceDefault_NoActionBar); | ||
| 194 | else | ||
| 195 | setTheme (android.R.style.Theme_NoTitleBar); | ||
| 196 | |||
| 197 | params = new FrameLayout.LayoutParams (LayoutParams.MATCH_PARENT, | 190 | params = new FrameLayout.LayoutParams (LayoutParams.MATCH_PARENT, |
| 198 | LayoutParams.MATCH_PARENT); | 191 | LayoutParams.MATCH_PARENT); |
| 199 | 192 | ||
diff --git a/java/res/values-v11/style.xml b/java/res/values-v11/style.xml new file mode 100644 index 00000000000..50cf96e8bc5 --- /dev/null +++ b/java/res/values-v11/style.xml | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | <!-- Style resources for GNU Emacs on Android. | ||
| 2 | |||
| 3 | Copyright (C) 2023 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. --> | ||
| 19 | |||
| 20 | <resources> | ||
| 21 | <!-- Style used for popup menus and relatives on Android 3.x. --> | ||
| 22 | <style name="EmacsStyle" parent="@android:style/Theme.Holo.NoActionBar"/> | ||
| 23 | </resources> | ||
diff --git a/java/res/values-v14/style.xml b/java/res/values-v14/style.xml new file mode 100644 index 00000000000..4124887ab5a --- /dev/null +++ b/java/res/values-v14/style.xml | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | <!-- Style resources for GNU Emacs on Android. | ||
| 2 | |||
| 3 | Copyright (C) 2023 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. --> | ||
| 19 | |||
| 20 | <resources> | ||
| 21 | <!-- Style used for popup menus and relatives between Android 4.0 | ||
| 22 | and Android 10. --> | ||
| 23 | <style name="EmacsStyle" parent="@android:style/Theme.DeviceDefault.NoActionBar"/> | ||
| 24 | </resources> | ||
diff --git a/java/res/values-v29/style.xml b/java/res/values-v29/style.xml new file mode 100644 index 00000000000..cd4a6dd1fec --- /dev/null +++ b/java/res/values-v29/style.xml | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | <!-- Style resources for GNU Emacs on Android. | ||
| 2 | |||
| 3 | Copyright (C) 2023 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. --> | ||
| 19 | |||
| 20 | <resources> | ||
| 21 | <!-- Style used for popup menus and relatives from Android 10.0 | ||
| 22 | onwards--> | ||
| 23 | <style name="EmacsStyle" parent="@android:style/Theme.DeviceDefault.DayNight"> | ||
| 24 | <item name="android:windowActionBar">false</item> | ||
| 25 | <item name="android:windowNoTitle">true</item> | ||
| 26 | |||
| 27 | <!-- Required to make sure the status bar text remains legible. --> | ||
| 28 | <item name="android:statusBarColor">@android:color/black</item> | ||
| 29 | </style> | ||
| 30 | </resources> | ||
diff --git a/java/res/values/style.xml b/java/res/values/style.xml new file mode 100644 index 00000000000..396b7d8da39 --- /dev/null +++ b/java/res/values/style.xml | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | <!-- Style resources for GNU Emacs on Android. | ||
| 2 | |||
| 3 | Copyright (C) 2023 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. --> | ||
| 19 | |||
| 20 | <resources> | ||
| 21 | <!-- Style used for popup menus and relatives on Android 2.2 and | ||
| 22 | 2.3. Styles used for newer Android versions are defined in | ||
| 23 | the res/values- directories for their respective API levels. --> | ||
| 24 | <style name="EmacsStyle" parent="@android:style/Theme.NoTitleBar"/> | ||
| 25 | </resources> | ||