Releases: chrisbanes/insetter
v0.6.1
What’s Changed
- Dependency and general updates (#122) @chrisbanes
- Add Migration.kt (#114) @osipxd
- Support using getInsetsIgnoringVisibility (#121) @ivaniskandar
- Add CONSUME_AUTO support in Kotlin DSL (#112) @SteinerOk
v0.6.0
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
- Support for animated insets (#88) @chrisbanes
- Dependency updates (#109) @chrisbanes
- Remove deprecated APIs (#111) @chrisbanes
- Remove Widgets library (#110) @chrisbanes
- Fix MkDocs URIs (#108) @SimonMarquis
- Set Kotlin module name to fix library conflict (#101) @kdrag0n
- Correct a mistake in library doc example (#100) @qwertyfinger
v0.5.0
🆕 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
- Tidy up the Side class (#95) @chrisbanes
- Update dependencies (#96) @chrisbanes
- Improve the docs + website (#94) @chrisbanes
- New Kotlin DSL (#92) @chrisbanes
- Apply insets on every attach (#91) @alexvanyo
- Allo user to choose if he wants to consume insets wen using setOnApplyInsetsListener (#89) @SamYStudiO
- Support for the Android 11 WindowInsets types (#86) @chrisbanes
👏 Thanks to all of the contributors above!
v0.4.0
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
- Rename Maven group to dev.chrisbanes.insetter (#85) @chrisbanes
- Convert the widgets library to Kotlin (#84) @chrisbanes
- Convert the DBX library to Kotlin (#83) @chrisbanes
- Update CI caching (#82) @chrisbanes
- Add website (#81) @chrisbanes
- Move KTX contents into library (#80) @chrisbanes
- Add working tests for dbx extensions (#29) @chrisbanes
- Convert Insetter main library to Kotlin (#78) @chrisbanes
- Add API tracking (#77) @chrisbanes
- Dependency updates (#76) @chrisbanes
- Add requestLayout() call on parent view for pre 26 API level (#75) @VitaliyBelyaev
- Add the ability to reuse insetter (#71) @mercuriy94
- Add reuse of Insetter to InsetterConstraintHelper (#72) @mercuriy94
v0.3.1
What’s Changed
- Use setEdgeToEdgeSystemUiFlags in samples (#69) @chrisbanes
- Add
consumeSystemWindowInsets
support to insetter-widgets (#68) @chrisbanes - Add new consumption options (#67) @chrisbanes
- Update to ktlint 0.37.0 (#64) @chrisbanes
- Re-enable release-drafter (#65) @chrisbanes
v0.3.0
This is a big released with a completely re-vamped API! Thanks to all of the contributors.
What’s Changed
- Tweaks around docs/readme before next release (#63) @chrisbanes
- Add builder API for applying WindowInsets (#62) @poliver
- Make Insetter final (#61) @ZacSweers
- Make the generation enum set method public (#59) @mercuriy94
- Update readme to match new extensions (#56) @mercuriy94
v0.2.2
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.
- Update dependencies (#52) @chrisbanes
- Run CI Actions on pull requests (#53) @chrisbanes
- Added extensions for padding and margins (#51). Thanks to @mercuriy94!
- Set the default of setEdgeToEdgeSystemUiFlags to true (#50) Thanks to @PaulWoitaschek!
v0.2.1
What’s Changed
- Move dbx/ktx libraries to use unique package names (#47) @chrisbanes
- Migrate tests to be device ran instrumentation tests (#45) @chrisbanes
- Adds spotless configuration for Gradle build files in Groovy (#40) @pfmaggi
- Fix tests for API 29 (#36) @chrisbanes
- Ensure we remove the attach state listener once fired (#37) @chrisbanes
- Update README.md with new updated api example (#35) @ColtonIdle
- Try using GitHub Actions (#34) @chrisbanes
v0.2.0
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 accompanyingdbx
attribute:layout_edgeToEdge
. Insetter.applyInsetsToView()
function, which allows easy application of insets at runtime from code. This is what powers all of thewidgets
anddbx
libraries.- Sample added. It's very basic but does what it needs to.
API changes
- Renamed
app:paddingXXXGestureInsets
toapp:paddingXXXSystemGestureInsets
for consistency. - Renamed
app:marginXXXX
attributes to match system naming scheme:app:layout_marginXXXX
v0.1.1
- Make
OnApplyInsetsListener
public (it was made pkg-private in v0.1.0).