Skip to content

Commit 76ae073

Browse files
authored
chore: bump target SDK version to 35 (#167)
* chore: bump target SDK version to 35 * fix: handle nullable values properly * feat!: enable edge to edge * feat!: bump target SDK version to 36 * fix!: convert compose properties to extension functions * refactor!: rework edge to edge helpers * feat(customization): change navigation icon button from cross to arrow * feat: add helpers for system bars * refactor: rework search bar layout * refactor: rename method * fix: apply horizontal insets too * refactor!: rework edge to edge helper again * refactor: accept view as parameter in insetsController() * fix: ignore visibility when applying system insets * refactor: make transient behavior optional * chore: update lint baselines * refactor!: remove deprecated system bar related extensions * fix: pad display cutout as well * refactor: remove duplicated code * feat: add modern back navigation handling * feat!: add helper for cutout padding * feat: add version checks for android 15 and 16 * feat(window): pad for display cutouts by default * feat(commons): cancel scroll animation in onDestroy Cancels the `materialScrollColorAnimation` and sets it to null in the `onDestroy` lifecycle method to prevent potential memory leaks. * feat: add default animation duration constant * fix: use proper system icon colors with search bars * fix: disable search bar scrolling for now Refs: https://github.com/orgs/FossifyOrg/discussions/270 * fix: don't double pad due to cutout Activity handles this * refactor: migrate away from deprecated `onBackPressed()` * feat: preserve base padding when applying insets * fix: prevent FAB overlap with system bars * fix: migrate away from deprecated `onBackPressed()`
1 parent bcad909 commit 76ae073

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1193
-2771
lines changed

commons/detekt-baseline.xml

Lines changed: 5 additions & 47 deletions
Large diffs are not rendered by default.

commons/lint-baseline.xml

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

commons/src/main/kotlin/org/fossify/commons/activities/AppLockActivity.kt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,23 @@ import android.app.Activity
44
import android.content.Intent
55
import android.os.Bundle
66
import androidx.activity.addCallback
7-
import androidx.appcompat.app.AppCompatActivity
87
import androidx.biometric.auth.AuthPromptHost
98
import org.fossify.commons.R
109
import org.fossify.commons.adapters.AppLockAdapter
1110
import org.fossify.commons.databinding.ActivityAppLockBinding
12-
import org.fossify.commons.extensions.*
11+
import org.fossify.commons.extensions.appLockManager
12+
import org.fossify.commons.extensions.baseConfig
13+
import org.fossify.commons.extensions.getProperBackgroundColor
14+
import org.fossify.commons.extensions.getThemeId
15+
import org.fossify.commons.extensions.isBiometricAuthSupported
16+
import org.fossify.commons.extensions.onGlobalLayout
17+
import org.fossify.commons.extensions.overrideActivityTransition
18+
import org.fossify.commons.extensions.viewBinding
1319
import org.fossify.commons.helpers.PROTECTION_FINGERPRINT
1420
import org.fossify.commons.helpers.isRPlus
1521
import org.fossify.commons.interfaces.HashListener
1622

17-
class AppLockActivity : AppCompatActivity(), HashListener {
23+
class AppLockActivity : EdgeToEdgeActivity(), HashListener {
1824

1925
private val binding by viewBinding(ActivityAppLockBinding::inflate)
2026

@@ -24,6 +30,7 @@ class AppLockActivity : AppCompatActivity(), HashListener {
2430

2531
super.onCreate(savedInstanceState)
2632
setContentView(binding.root)
33+
setupEdgeToEdge(padBottomSystem = listOf(binding.viewPager))
2734
onBackPressedDispatcher.addCallback(owner = this) {
2835
appLockManager.lock()
2936
finishAffinity()
@@ -77,8 +84,6 @@ class AppLockActivity : AppCompatActivity(), HashListener {
7784
private fun setupTheme() {
7885
setTheme(getThemeId(showTransparentTop = true))
7986
with(getProperBackgroundColor()) {
80-
window.updateStatusBarColors(this)
81-
window.updateNavigationBarColors(this)
8287
window.decorView.setBackgroundColor(this)
8388
}
8489
}

0 commit comments

Comments
 (0)