Skip to content

Commit 8d2d695

Browse files
authored
Merge pull request #99 from infinum/develop
Release 5.4.1
2 parents e6c1a76 + 277e11f commit 8d2d695

File tree

7 files changed

+39
-14
lines changed

7 files changed

+39
-14
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
=========
33

4+
## Version 5.4.1
5+
6+
_2021-09-25_
7+
8+
* Update to Kotlin 1.5.31.
9+
* Fix backwards compatibility for specific Android API levels.
10+
411
## Version 5.4.0
512

613
_2021-09-13_

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ Then add the following dependencies in your app `build.gradle` or `build.gradle.
4444

4545
**Groovy**
4646
```groovy
47-
debugImplementation "com.infinum.dbinspector:dbinspector:5.4.0"
48-
releaseImplementation "com.infinum.dbinspector:dbinspector-no-op:5.4.0"
47+
debugImplementation "com.infinum.dbinspector:dbinspector:5.4.1"
48+
releaseImplementation "com.infinum.dbinspector:dbinspector-no-op:5.4.1"
4949
```
5050
**KotlinDSL**
5151
```kotlin
52-
debugImplementation("com.infinum.dbinspector:dbinspector:5.4.0")
53-
releaseImplementation("com.infinum.dbinspector:dbinspector-no-op:5.4.0")
52+
debugImplementation("com.infinum.dbinspector:dbinspector:5.4.1")
53+
releaseImplementation("com.infinum.dbinspector:dbinspector-no-op:5.4.1")
5454
```
5555

5656
### Usage

config.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ext {
77
]
88
releaseConfig = [
99
"group" : "com.infinum.dbinspector",
10-
"version" : "5.4.0",
11-
"versionCode": 5 * 100 * 100 + 4 * 100 + 0
10+
"version" : "5.4.1",
11+
"versionCode": 5 * 100 * 100 + 4 * 100 + 1
1212
]
1313
}

dbinspector/src/main/kotlin/com/infinum/dbinspector/ui/shared/base/BaseActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
package com.infinum.dbinspector.ui.shared.base
22

33
import android.os.Bundle
4+
import androidx.annotation.CallSuper
45
import androidx.annotation.RestrictTo
56
import androidx.appcompat.app.AppCompatActivity
7+
import androidx.core.view.WindowInsetsControllerCompat
68
import androidx.lifecycle.lifecycleScope
79
import androidx.viewbinding.ViewBinding
810
import com.infinum.dbinspector.R
@@ -13,9 +15,12 @@ internal abstract class BaseActivity<State, Event> : AppCompatActivity(), BaseVi
1315

1416
abstract val binding: ViewBinding
1517

18+
@CallSuper
1619
override fun onCreate(savedInstanceState: Bundle?) {
1720
super.onCreate(savedInstanceState)
1821

22+
WindowInsetsControllerCompat(window, window.decorView).isAppearanceLightStatusBars = false
23+
1924
setContentView(binding.root)
2025

2126
collectFlows(lifecycleScope)

dbinspector/src/main/kotlin/com/infinum/dbinspector/ui/shared/base/BaseBottomSheetDialogFragment.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
package com.infinum.dbinspector.ui.shared.base
22

3+
import android.app.Dialog
4+
import android.os.Build
35
import android.os.Bundle
46
import android.view.LayoutInflater
57
import android.view.View
68
import android.view.ViewGroup
9+
import android.view.WindowManager
710
import androidx.annotation.CallSuper
811
import androidx.annotation.LayoutRes
912
import androidx.annotation.RestrictTo
1013
import androidx.lifecycle.lifecycleScope
1114
import androidx.viewbinding.ViewBinding
1215
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
16+
import com.infinum.dbinspector.R
1317
import com.infinum.dbinspector.di.LibraryKoinComponent
1418

1519
@RestrictTo(RestrictTo.Scope.LIBRARY)
@@ -19,6 +23,18 @@ internal abstract class BaseBottomSheetDialogFragment<State, Event>(
1923

2024
abstract val binding: ViewBinding
2125

26+
@CallSuper
27+
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog =
28+
super.onCreateDialog(savedInstanceState).apply {
29+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
30+
window?.let {
31+
it.addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND)
32+
it.attributes.blurBehindRadius = resources.getDimensionPixelSize(R.dimen.dbinspector_blur_radius)
33+
}
34+
}
35+
}
36+
37+
@CallSuper
2238
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? =
2339
inflater.inflate(contentLayoutId, container, false)
2440

dbinspector/src/main/res/values/themes.xml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<resources xmlns:tools="http://schemas.android.com/tools">
2+
<resources>
33

44
<style name="DbInspector.BaseTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
55
<item name="colorPrimary">@color/dbinspector_color_primary</item>
@@ -8,7 +8,6 @@
88
<item name="colorOnSecondary">@android:color/white</item>
99
<item name="bottomSheetDialogTheme">@style/DbInspector.Theme.BottomSheetDialog</item>
1010
<item name="android:statusBarColor">@color/dbinspector_status_bar</item>
11-
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
1211
</style>
1312

1413
<style name="DbInspector.ToggleButton" parent="@style/Widget.MaterialComponents.Button.OutlinedButton">
@@ -19,13 +18,11 @@
1918

2019
<style name="DbInspector.Theme.BottomSheetDialog" parent="@style/ThemeOverlay.MaterialComponents.BottomSheetDialog">
2120
<item name="bottomSheetStyle">@style/DbInspector.Theme.BottomSheetDialog.Style</item>
22-
<item name="android:windowBlurBehindEnabled" tools:targetApi="s">true</item>
23-
<item name="android:windowBlurBehindRadius" tools:targetApi="s">@dimen/dbinspector_blur_radius
24-
</item>
2521
</style>
2622

2723
<style name="DbInspector.Theme.BottomSheetDialog.Style" parent="Widget.MaterialComponents.BottomSheet">
28-
<item name="shapeAppearanceOverlay">@style/DbInspector.ShapeAppearanceOverlay.BottomSheet</item>
24+
<item name="shapeAppearanceOverlay">@style/DbInspector.ShapeAppearanceOverlay.BottomSheet
25+
</item>
2926
</style>
3027

3128
<style name="DbInspector.ShapeAppearanceOverlay.BottomSheet" parent="">

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
2-
dbinspector = "5.4.0"
2+
dbinspector = "5.4.1"
33
gradle = "7.0.2"
4-
kotlin = "1.5.30"
4+
kotlin = "1.5.31"
55
coroutines = "1.5.2"
66
core = "1.6.0"
77
appcompat = "1.3.1"

0 commit comments

Comments
 (0)