diff --git a/docs/dbx.md b/docs/dbx.md index f1e33dc..dceb1e6 100644 --- a/docs/dbx.md +++ b/docs/dbx.md @@ -87,8 +87,8 @@ The same behavior happens when using margin too. ## Edge-to-edge attributes There is currently just one edge-to-edge attribute: - * `app:layout_edgeToEdge`: Set this view's system-ui visibility with the flags required to be laid out 'edge-to-edge', or not. - +* `app:layout_edgeToEdge`: Set this view's system-ui visibility with the flags required to be laid out 'edge-to-edge', or not. + ``` xml - - - - -``` - -📖 You can read more information [here](widgets/). +The old `insetter-widgets` library has now removed. View binding + improvements to the main library mean that it now simple to use the main library only. ### insetter-ktx @@ -91,7 +68,7 @@ The old `insetter-ktx` library has now removed, as all of the KTX functions have The library is being written to production quality, but it is not adhering to semantic versioning, mean we may change the API if needed, though we'll try not to. We're using this repository to allow quick and easy prototyping. The contents of this library may eventually be moved into -[Android Jetpack](https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/) +[Android Jetpack](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/) at a later date. ## Contributions @@ -102,7 +79,7 @@ Make sure to read the [Contributing](contributing) page first though. ## License ``` -Copyright 2019 Google LLC. +Copyright 2021 Google LLC. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -118,5 +95,4 @@ limitations under the License. ``` [databinding]: https://developer.android.com/topic/libraries/data-binding -[icl]: api/widgets/widgets/dev.chrisbanes.insetter.widgets.constraintlayout/-insetter-constraint-layout/ [snap]: https://oss.sonatype.org/content/repositories/snapshots/ diff --git a/docs/widgets.md b/docs/widgets.md deleted file mode 100644 index 28ce796..0000000 --- a/docs/widgets.md +++ /dev/null @@ -1,246 +0,0 @@ -# Insetter widgets - -An extension library which provides versions of commonly used ViewGroups with enhanced inset -handling. Currently this library is focusing on building upon -[ConstraintLayout][cl]. - -!!! warning - The future for the widgets library is currently being evaluated. It's unclear how useful it is, - and the amount of effort needed to update it to the new WindowInsets types is great. - - View binding + improvements to the main library mean that it now simple to use the main library only. - ---- - -There are currently two ways to use Insetter with [ConstraintLayout][cl]: -[InsetterConstraintLayout][icl] which is a subclass, or [InsetterConstraintHelper][ich] which is a constraint helper. - -## InsetterConstraintLayout - -[InsetterConstraintLayout][icl] is a [ConstraintLayout][cl] which adds support for a number of -attributes to define inset behavior on child views. - -The attributes currently provided are: - - * `app:paddingSystemWindowInsets`: to apply the [system window insets][swi] using padding. - * `app:layout_marginSystemWindowInsets`: to apply the [system window insets][swi] using margin. - * `app:paddingSystemGestureInsets`: to apply the [system gesture insets][sgi] using padding. - * `app:layout_marginSystemGestureInsets`: to apply the [system gesture insets][sgi] using margin. - -Each of the attributes takes a combination of flags, defining which dimensions the chosen -insets should be applied to. An example can be seen below: - -``` xml - - - - - -``` - -Here, the `ImageView`'s padding on all dimensions will be increased by the [system window insets][swi]. - ---- - -You can also mix inset types, such as below where the view's padding will be using the left and right -[system window insets][swi] values, and the bottom [system gesture insets][sgi]: - -``` xml - - - - - -``` - ---- - -And similarly, you can mix application types. This time the view's padding will be using the left and right -[system window insets][swi] values, but the view's bottom margin which be using the [system gesture insets][sgi]: - -``` xml - - - - - -``` - -## InsetterConstraintHelper - -Next up we have [InsetterConstraintHelper][ich], a constraint helper allowing you to apply inset -handling to all of the helper's referenced views. - -Let's look at an example: - -``` xml - - - - - - -