Skip to content

Commit

Permalink
Merge pull request #99 from infinum/develop
Browse files Browse the repository at this point in the history
Release 5.4.1
  • Loading branch information
bojankoma authored Sep 25, 2021
2 parents e6c1a76 + 277e11f commit 8d2d695
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 14 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

## Version 5.4.1

_2021-09-25_

* Update to Kotlin 1.5.31.
* Fix backwards compatibility for specific Android API levels.

## Version 5.4.0

_2021-09-13_
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ Then add the following dependencies in your app `build.gradle` or `build.gradle.

**Groovy**
```groovy
debugImplementation "com.infinum.dbinspector:dbinspector:5.4.0"
releaseImplementation "com.infinum.dbinspector:dbinspector-no-op:5.4.0"
debugImplementation "com.infinum.dbinspector:dbinspector:5.4.1"
releaseImplementation "com.infinum.dbinspector:dbinspector-no-op:5.4.1"
```
**KotlinDSL**
```kotlin
debugImplementation("com.infinum.dbinspector:dbinspector:5.4.0")
releaseImplementation("com.infinum.dbinspector:dbinspector-no-op:5.4.0")
debugImplementation("com.infinum.dbinspector:dbinspector:5.4.1")
releaseImplementation("com.infinum.dbinspector:dbinspector-no-op:5.4.1")
```

### Usage
Expand Down
4 changes: 2 additions & 2 deletions config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {
]
releaseConfig = [
"group" : "com.infinum.dbinspector",
"version" : "5.4.0",
"versionCode": 5 * 100 * 100 + 4 * 100 + 0
"version" : "5.4.1",
"versionCode": 5 * 100 * 100 + 4 * 100 + 1
]
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.infinum.dbinspector.ui.shared.base

import android.os.Bundle
import androidx.annotation.CallSuper
import androidx.annotation.RestrictTo
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.WindowInsetsControllerCompat
import androidx.lifecycle.lifecycleScope
import androidx.viewbinding.ViewBinding
import com.infinum.dbinspector.R
Expand All @@ -13,9 +15,12 @@ internal abstract class BaseActivity<State, Event> : AppCompatActivity(), BaseVi

abstract val binding: ViewBinding

@CallSuper
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

WindowInsetsControllerCompat(window, window.decorView).isAppearanceLightStatusBars = false

setContentView(binding.root)

collectFlows(lifecycleScope)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
package com.infinum.dbinspector.ui.shared.base

import android.app.Dialog
import android.os.Build
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import androidx.annotation.CallSuper
import androidx.annotation.LayoutRes
import androidx.annotation.RestrictTo
import androidx.lifecycle.lifecycleScope
import androidx.viewbinding.ViewBinding
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.infinum.dbinspector.R
import com.infinum.dbinspector.di.LibraryKoinComponent

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

abstract val binding: ViewBinding

@CallSuper
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog =
super.onCreateDialog(savedInstanceState).apply {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
window?.let {
it.addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND)
it.attributes.blurBehindRadius = resources.getDimensionPixelSize(R.dimen.dbinspector_blur_radius)
}
}
}

@CallSuper
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? =
inflater.inflate(contentLayoutId, container, false)

Expand Down
9 changes: 3 additions & 6 deletions dbinspector/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>

<style name="DbInspector.BaseTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">@color/dbinspector_color_primary</item>
Expand All @@ -8,7 +8,6 @@
<item name="colorOnSecondary">@android:color/white</item>
<item name="bottomSheetDialogTheme">@style/DbInspector.Theme.BottomSheetDialog</item>
<item name="android:statusBarColor">@color/dbinspector_status_bar</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
</style>

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

<style name="DbInspector.Theme.BottomSheetDialog" parent="@style/ThemeOverlay.MaterialComponents.BottomSheetDialog">
<item name="bottomSheetStyle">@style/DbInspector.Theme.BottomSheetDialog.Style</item>
<item name="android:windowBlurBehindEnabled" tools:targetApi="s">true</item>
<item name="android:windowBlurBehindRadius" tools:targetApi="s">@dimen/dbinspector_blur_radius
</item>
</style>

<style name="DbInspector.Theme.BottomSheetDialog.Style" parent="Widget.MaterialComponents.BottomSheet">
<item name="shapeAppearanceOverlay">@style/DbInspector.ShapeAppearanceOverlay.BottomSheet</item>
<item name="shapeAppearanceOverlay">@style/DbInspector.ShapeAppearanceOverlay.BottomSheet
</item>
</style>

<style name="DbInspector.ShapeAppearanceOverlay.BottomSheet" parent="">
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
dbinspector = "5.4.0"
dbinspector = "5.4.1"
gradle = "7.0.2"
kotlin = "1.5.30"
kotlin = "1.5.31"
coroutines = "1.5.2"
core = "1.6.0"
appcompat = "1.3.1"
Expand Down

0 comments on commit 8d2d695

Please sign in to comment.