Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Releases: chrisbanes/insetter

v0.6.1

13 Nov 14:39
Compare
Choose a tag to compare

What’s Changed

v0.6.0

25 May 14:37
Compare
Choose a tag to compare

Highlights

Animated Insets 💃

Insetter now supports animated window insets. See the docs for more information, but the API is pretty simple:

binding.messageHolder.applyInsetter {
    // Apply the navigation bar and ime insets...
    type(navigationBars = true, ime = true) {
        // ..as padding, enabling the animation support
        padding(animated = true)
    }

    // This is optional, but it's usually necessary to sync the resulting
    // translation to other views. You can provide multiple views here.
    syncTranslationTo(binding.conversationRecyclerview)
}

[Breaking] Removed all previously deprecated API & Widgets library 🗑

Having a clear out of old functionality.

All changes

v0.5.0

12 Feb 16:18
6068a9a
Compare
Choose a tag to compare

🆕 WindowInsets.Type support

Insetter now fully supports the new recent API improvements to WindowInsets. We use the backported functionality available in AndroidX Core 1.5.0-beta01 which allows it to work back to API 21:

Insetter.builder()
    .padding(windowInsetTypesOf(navigationBars = true))
    .margin(windowInsetTypesOf(statusBars = true))
    .applyToView(view)

📖 See here for more information.

All of the old inset type functions (applySystemWindowInsetsToPadding(), etc) have been deprecated.

🆕 DSL for Kotlin users

We now have a new DSL for Kotlin users:

view.applyInsetter {
    // Apply the navigation bar insets...
    type(navigationBars = true) {
        // Add to padding on all sides
        padding()
    }

    // Apply the status bar insets...
    type(statusBars = true) {
        // Add to margin on all sides
        margin()
    }
}

📖 See here for more information.


All changes

👏 Thanks to all of the contributors above!

v0.4.0

05 Jan 10:14
Compare
Choose a tag to compare

New Maven group name

To better seperate the libraries released under my domain, I'm moved all of the libraries to the dev.chrisbanes.insetter group.

- implementation 'dev.chrisbanes:insetter:XXX'
+ implementation 'dev.chrisbanes.insetter:insetter:0.4.0'

- implementation 'dev.chrisbanes:insetter-dbx:XXX'
+ implementation 'dev.chrisbanes.insetter:insetter-dbx:0.4.0'

- implementation 'dev.chrisbanes:insetter-widgets:XXX'
+ implementation 'dev.chrisbanes.insetter:insetter-widgets:0.4.0'

Note: Only the Maven dependency group name has changed. The package name is unaffected.

Re-written in Kotlin

The whole library has now been converted to Kotlin to increase development speed. For this release, we've kept the exact existing API, so anyone using this from Java should see no API changes.

Going forward we will be updating the API to improve the ergonomics for Kotlin users. We will of course maintain compatability for Java users, but not necessarily the exact API we currently have.

KTX library has been removed

Since the whole library is now written in Kotlin, we no longer require a seperate KTX library. The KTX library has been removed in v0.4.0, and it's extension functions moved to the main library. This means you can safely remove the ktx dependency and use the main library like so:

- implementation 'dev.chrisbanes:insetter-ktx:XXX'
+ implementation 'dev.chrisbanes.insetter:insetter:0.4.0'

New website and docs

We now have a proper documentation website with API docs 🎉: https://chrisbanes.github.io/insetter/

Bug fixes

Thanks to @VitaliyBelyaev and @mercuriy94 for lots of bug fixes (see below). Sorry for taking so long to release them!

Future

I'll soon begin working on updating Insetter to include support for the new inset types introduced in Android 11, as well as exploring support for WindowInsetsAnimation. Coming soon...

All changes

v0.3.1

11 Jul 10:46
Compare
Choose a tag to compare

What’s Changed

v0.3.0

09 Jun 09:41
Compare
Choose a tag to compare

This is a big released with a completely re-vamped API! Thanks to all of the contributors.

What’s Changed

v0.2.2

27 Apr 14:53
Compare
Choose a tag to compare

What’s Changed

Insetter now depends on the Android Gradle Plugin v3.6.0, which means that any apps using insetter-dbx also need to be using Android Gradle Plugin v3.6.0 (or newer). Insetter also now depends on Kotlin 1.3.31.

v0.2.1

21 Feb 19:53
Compare
Choose a tag to compare

What’s Changed

v0.2.0

03 Nov 22:32
Compare
Choose a tag to compare

This is a big release 🎉

New features

  • Widgets library, allowing easy inset handling on top of ConstraintLayout, allowing the same attributes provided by dbx. See the widgets library for more info.
  • Edge-to-edge flag APIs: Insetter.setEdgeToEdgeSystemUiFlags(), with accompanying dbx attribute: layout_edgeToEdge.
  • Insetter.applyInsetsToView() function, which allows easy application of insets at runtime from code. This is what powers all of the widgets and dbx libraries.
  • Sample added. It's very basic but does what it needs to.

API changes

  • Renamed app:paddingXXXGestureInsets to app:paddingXXXSystemGestureInsets for consistency.
  • Renamed app:marginXXXX attributes to match system naming scheme: app:layout_marginXXXX

[Commit diff]

v0.1.1

18 Oct 15:55
Compare
Choose a tag to compare
  • Make OnApplyInsetsListener public (it was made pkg-private in v0.1.0).