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

Commit

Permalink
Some final README updates (#31)
Browse files Browse the repository at this point in the history
Some final README updates
  • Loading branch information
chrisbanes authored Nov 3, 2019
2 parents 227a9be + a32a177 commit 50e5224
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions widgets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ applying the [system window insets][swi] left and bottom using padding:
<dev.chrisbanes.insetter.widgets.constraintlayout.InsetterConstraintLayout>

<ImageView
android:padding="24dp"
app:paddingSystemWindowInsets="left|bottom" />

</dev.chrisbanes.insetter.widgets.constraintlayout.InsetterConstraintLayout>
Expand All @@ -174,9 +175,9 @@ The same behavior happens when using margin too.

## `InsetterConstraintLayout` vs `InsetterConstraintHelper`?

We have two things here which both provide the same functionality on top of [ConstraintLayout][cl],
We have two things which both provide the same functionality on top of [ConstraintLayout][cl],
so how do you decide which to use? To help I've listed some of the benefits for each, allowing you
to decide which to use:
to decide:

* `InsetterConstraintLayout` benefit #1. The attributes are defined directly on the children, which
is clearer when reading the source (for code-review, etc).
Expand All @@ -200,5 +201,5 @@ this library provide very similar functionality at the cost of having to migrate
[cl]: https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintLayout.html
[swi]: https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat.html#getSystemWindowInsets()
[sgi]: https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat.html#getSystemGestureInsets()
[icl]: widgets/src/main/java/dev/chrisbanes/insetter/widgets/constraintlayout/InsetterConstraintLayout.java
[ich]: widgets/src/main/java/dev/chrisbanes/insetter/widgets/constraintlayout/InsetterConstraintHelper.java
[icl]: src/main/java/dev/chrisbanes/insetter/widgets/constraintlayout/InsetterConstraintLayout.java
[ich]: src/main/java/dev/chrisbanes/insetter/widgets/constraintlayout/InsetterConstraintHelper.java

0 comments on commit 50e5224

Please sign in to comment.