Skip to content

Commit 48d6556

Browse files
authored
chore: bump target SDK version to 35 (#212)
* chore: bump target SDK version to 35 * chore: bump target SDK version to 36 * refactor: update edge-to-edge implementation * refactor: update edge-to-edge implementation * refactor: migrate away from deprecated onBackPressed() * chore(deps): update org.fossify.commons to 5.5.0 * docs: update changelog * docs: update changelog * build: bump detekt return count limit * chore: update lint baselines
1 parent 91f2193 commit 48d6556

File tree

13 files changed

+126
-89
lines changed

13 files changed

+126
-89
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
### Changed
10+
- Compatibility updates for Android 15 & 16
11+
12+
### Fixed
13+
- Fixed invisible numbers in the top row ([#100])
14+
915
## [1.5.0] - 2025-09-23
1016
### Added
1117
- German QWERTZ layout without dedicated umlaut keys ([#47])
@@ -93,6 +99,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9399

94100
[#47]: https://github.com/FossifyOrg/Keyboard/issues/47
95101
[#78]: https://github.com/FossifyOrg/Keyboard/issues/78
102+
[#100]: https://github.com/FossifyOrg/Keyboard/issues/100
96103
[#133]: https://github.com/FossifyOrg/Keyboard/issues/133
97104
[#134]: https://github.com/FossifyOrg/Keyboard/issues/134
98105
[#136]: https://github.com/FossifyOrg/Keyboard/issues/136

app/detekt-baseline.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
<ID>MaxLineLength:ExportClipsDialog.kt$ExportClipsDialog$val title = String.format(activity.getString(R.string.file_already_exists_overwrite), newPath.getFilenameFromPath())</ID>
6262
<ID>MaxLineLength:ManageClipboardItemsActivity.kt$ManageClipboardItemsActivity$clipboardItemsPlaceholder.text = "${getText(R.string.manage_clipboard_empty)}\n\n${getText(R.string.manage_clips)}"</ID>
6363
<ID>MaxLineLength:ManageClipboardItemsActivity.kt$ManageClipboardItemsActivity$if</ID>
64-
<ID>MaxLineLength:ManageClipboardItemsActivity.kt$ManageClipboardItemsActivity$updateMaterialActivityViews(clipboardCoordinator, clipboardItemsList, useTransparentNavigation = true, useTopSearchMenu = false)</ID>
6564
<ID>MaxLineLength:ManageClipboardItemsActivity.kt$ManageClipboardItemsActivity$val msg = if (clipsImported &gt; 0) R.string.importing_successful else R.string.no_new_entries_for_importing</ID>
6665
<ID>MaxLineLength:ManageClipboardItemsActivity.kt$ManageClipboardItemsActivity$}</ID>
6766
<ID>MaxLineLength:MyKeyboard.kt$MyKeyboard$*</ID>
@@ -102,11 +101,6 @@
102101
<ID>NestedBlockDepth:MyKeyboardView.kt$MyKeyboardView$private fun onLongPress(popupKey: MyKeyboard.Key, me: MotionEvent): Boolean</ID>
103102
<ID>NestedBlockDepth:MyKeyboardView.kt$MyKeyboardView$private fun onModifiedTouchEvent(me: MotionEvent): Boolean</ID>
104103
<ID>NestedBlockDepth:SimpleKeyboardIME.kt$SimpleKeyboardIME$override fun onKey(code: Int)</ID>
105-
<ID>ReturnCount:EmojiHelper.kt$fun parseRawJsonSpecsFile(context: Context, path: String): HashMap&lt;String, String&gt;</ID>
106-
<ID>ReturnCount:MyKeyboardView.kt$MyKeyboardView$private fun onLongPress(popupKey: MyKeyboard.Key, me: MotionEvent): Boolean</ID>
107-
<ID>ReturnCount:MyKeyboardView.kt$MyKeyboardView$private fun onModifiedTouchEvent(me: MotionEvent): Boolean</ID>
108-
<ID>ReturnCount:MyKeyboardView.kt$MyKeyboardView$private fun openPopupIfRequired(me: MotionEvent): Boolean</ID>
109-
<ID>ReturnCount:SimpleKeyboardIME.kt$SimpleKeyboardIME$private fun getCountToDelete(inputConnection: InputConnection): Int</ID>
110104
<ID>SpreadOperator:MyKeyboardView.kt$MyKeyboardView$(*animations.toTypedArray())</ID>
111105
<ID>SwallowedException:ManageClipboardItemsActivity.kt$ManageClipboardItemsActivity$e: ActivityNotFoundException</ID>
112106
<ID>SwallowedException:MyKeyboard.kt$MyKeyboard$e: Exception</ID>

app/lint-baseline.xml

Lines changed: 54 additions & 32 deletions
Large diffs are not rendered by default.

app/src/main/kotlin/org/fossify/keyboard/activities/MainActivity.kt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,15 @@ class MainActivity : SimpleActivity() {
2525
private val binding by viewBinding(ActivityMainBinding::inflate)
2626

2727
override fun onCreate(savedInstanceState: Bundle?) {
28-
isMaterialActivity = true
2928
super.onCreate(savedInstanceState)
3029
setContentView(binding.root)
3130
appLaunched(BuildConfig.APPLICATION_ID)
3231
setupOptionsMenu()
3332
refreshMenuItems()
3433

3534
binding.apply {
36-
updateMaterialActivityViews(
37-
mainCoordinator,
38-
mainHolder,
39-
useTransparentNavigation = false,
40-
useTopSearchMenu = false
41-
)
42-
setupMaterialScrollListener(mainNestedScrollview, mainToolbar)
35+
setupEdgeToEdge(padBottomSystem = listOf(mainNestedScrollview))
36+
setupMaterialScrollListener(binding.mainNestedScrollview, binding.mainAppbar)
4337

4438
changeKeyboardHolder.setOnClickListener {
4539
inputMethodManager.showInputMethodPicker()
@@ -49,7 +43,7 @@ class MainActivity : SimpleActivity() {
4943

5044
override fun onResume() {
5145
super.onResume()
52-
setupToolbar(binding.mainToolbar)
46+
setupTopAppBar(binding.mainAppbar)
5347
if (!isKeyboardEnabled()) {
5448
ConfirmationAdvancedDialog(
5549
activity = this,

app/src/main/kotlin/org/fossify/keyboard/activities/ManageClipboardItemsActivity.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,15 @@ class ManageClipboardItemsActivity : SimpleActivity(), RefreshRecyclerViewListen
3333
private val binding by viewBinding(ActivityManageClipboardItemsBinding::inflate)
3434

3535
override fun onCreate(savedInstanceState: Bundle?) {
36-
isMaterialActivity = true
3736
super.onCreate(savedInstanceState)
3837
setContentView(binding.root)
3938
setupOptionsMenu()
4039
updateTextColors(binding.suggestionsItemsHolder)
4140
updateClips()
4241

4342
binding.apply {
44-
updateMaterialActivityViews(clipboardCoordinator, clipboardItemsList, useTransparentNavigation = true, useTopSearchMenu = false)
45-
setupMaterialScrollListener(clipboardNestedScrollview, clipboardToolbar)
43+
setupEdgeToEdge(padBottomSystem = listOf(clipboardItemsList))
44+
setupMaterialScrollListener(binding.clipboardItemsList, binding.clipboardAppbar)
4645

4746
clipboardItemsPlaceholder.text = "${getText(R.string.manage_clipboard_empty)}\n\n${getText(R.string.manage_clips)}"
4847
clipboardItemsPlaceholder2.apply {
@@ -57,7 +56,7 @@ class ManageClipboardItemsActivity : SimpleActivity(), RefreshRecyclerViewListen
5756

5857
override fun onResume() {
5958
super.onResume()
60-
setupToolbar(binding.clipboardToolbar, NavigationIcon.Arrow)
59+
setupTopAppBar(binding.clipboardAppbar, NavigationIcon.Arrow)
6160
}
6261

6362
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {

app/src/main/kotlin/org/fossify/keyboard/activities/SettingsActivity.kt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,18 @@ class SettingsActivity : SimpleActivity() {
3636
private val binding by viewBinding(ActivitySettingsBinding::inflate)
3737

3838
override fun onCreate(savedInstanceState: Bundle?) {
39-
isMaterialActivity = true
4039
super.onCreate(savedInstanceState)
4140
setContentView(binding.root)
4241

4342
binding.apply {
44-
updateMaterialActivityViews(
45-
mainCoordinatorLayout = settingsCoordinator,
46-
nestedView = settingsHolder,
47-
useTransparentNavigation = true,
48-
useTopSearchMenu = false
49-
)
50-
setupMaterialScrollListener(settingsNestedScrollview, settingsToolbar)
43+
setupEdgeToEdge(padBottomSystem = listOf(settingsNestedScrollview))
44+
setupMaterialScrollListener(binding.settingsNestedScrollview, binding.settingsAppbar)
5145
}
5246
}
5347

5448
override fun onResume() {
5549
super.onResume()
56-
setupToolbar(binding.settingsToolbar, NavigationIcon.Arrow)
50+
setupTopAppBar(binding.settingsAppbar, NavigationIcon.Arrow)
5751

5852
setupCustomizeColors()
5953
setupUseEnglish()

app/src/main/kotlin/org/fossify/keyboard/services/SimpleKeyboardIME.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
561561
private fun updateBackgroundColors() {
562562
val backgroundColor = safeStorageContext.getKeyboardBackgroundColor()
563563
binding.keyboardHolder.setBackgroundColor(backgroundColor)
564-
window.window?.updateNavigationBarColors(backgroundColor)
564+
window.window?.setSystemBarsAppearance(backgroundColor)
565565
}
566566

567567
private fun Bitmap.toIcon(): Icon {

app/src/main/res/layout/activity_main.xml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,28 @@
55
android:layout_width="match_parent"
66
android:layout_height="match_parent">
77

8-
<com.google.android.material.appbar.MaterialToolbar
9-
android:id="@+id/main_toolbar"
8+
<org.fossify.commons.views.MyAppBarLayout
9+
android:id="@+id/main_appbar"
1010
android:layout_width="match_parent"
11-
android:layout_height="?attr/actionBarSize"
12-
android:background="@color/color_primary"
13-
app:menu="@menu/menu_main"
14-
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
11+
android:layout_height="wrap_content">
12+
13+
<com.google.android.material.appbar.MaterialToolbar
14+
android:id="@+id/main_toolbar"
15+
android:layout_width="match_parent"
16+
android:layout_height="?attr/actionBarSize"
17+
android:background="@color/color_primary"
18+
app:menu="@menu/menu_main"
19+
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
20+
21+
</org.fossify.commons.views.MyAppBarLayout>
1522

1623
<androidx.core.widget.NestedScrollView
1724
android:id="@+id/main_nested_scrollview"
1825
android:layout_width="match_parent"
1926
android:layout_height="match_parent"
20-
android:layout_marginTop="?attr/actionBarSize"
2127
android:fillViewport="true"
22-
android:scrollbars="none">
28+
android:scrollbars="none"
29+
app:layout_behavior="@string/appbar_scrolling_view_behavior">
2330

2431
<RelativeLayout
2532
android:id="@+id/main_holder"

app/src/main/res/layout/activity_manage_clipboard_items.xml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,29 @@
55
android:layout_width="match_parent"
66
android:layout_height="match_parent">
77

8-
<com.google.android.material.appbar.MaterialToolbar
9-
android:id="@+id/clipboard_toolbar"
8+
<org.fossify.commons.views.MyAppBarLayout
9+
android:id="@+id/clipboard_appbar"
1010
android:layout_width="match_parent"
11-
android:layout_height="?attr/actionBarSize"
12-
android:background="@color/color_primary"
13-
app:menu="@menu/menu_manage_clipboard_items"
14-
app:title="@string/manage_clipboard_items"
15-
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
11+
android:layout_height="wrap_content">
12+
13+
<com.google.android.material.appbar.MaterialToolbar
14+
android:id="@+id/clipboard_toolbar"
15+
android:layout_width="match_parent"
16+
android:layout_height="?attr/actionBarSize"
17+
android:background="@color/color_primary"
18+
app:menu="@menu/menu_manage_clipboard_items"
19+
app:title="@string/manage_clipboard_items"
20+
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
21+
22+
</org.fossify.commons.views.MyAppBarLayout>
1623

1724
<androidx.core.widget.NestedScrollView
1825
android:id="@+id/clipboard_nested_scrollview"
1926
android:layout_width="match_parent"
2027
android:layout_height="match_parent"
21-
android:layout_marginTop="?attr/actionBarSize"
2228
android:fillViewport="true"
23-
android:scrollbars="none">
29+
android:scrollbars="none"
30+
app:layout_behavior="@string/appbar_scrolling_view_behavior">
2431

2532
<RelativeLayout
2633
android:id="@+id/suggestions_items_holder"

app/src/main/res/layout/activity_settings.xml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,28 @@
66
android:layout_width="match_parent"
77
android:layout_height="match_parent">
88

9-
<com.google.android.material.appbar.MaterialToolbar
10-
android:id="@+id/settings_toolbar"
9+
<org.fossify.commons.views.MyAppBarLayout
10+
android:id="@+id/settings_appbar"
1111
android:layout_width="match_parent"
12-
android:layout_height="?attr/actionBarSize"
13-
android:background="@color/color_primary"
14-
app:title="@string/settings"
15-
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
12+
android:layout_height="wrap_content">
13+
14+
<com.google.android.material.appbar.MaterialToolbar
15+
android:id="@+id/settings_toolbar"
16+
android:layout_width="match_parent"
17+
android:layout_height="?attr/actionBarSize"
18+
android:background="@color/color_primary"
19+
app:title="@string/settings"
20+
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
21+
22+
</org.fossify.commons.views.MyAppBarLayout>
1623

1724
<androidx.core.widget.NestedScrollView
1825
android:id="@+id/settings_nested_scrollview"
1926
android:layout_width="match_parent"
2027
android:layout_height="match_parent"
21-
android:layout_marginTop="?attr/actionBarSize"
2228
android:fillViewport="true"
23-
android:scrollbars="none">
29+
android:scrollbars="none"
30+
app:layout_behavior="@string/appbar_scrolling_view_behavior">
2431

2532
<LinearLayout
2633
android:id="@+id/settings_holder"

0 commit comments

Comments
 (0)