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

Commit

Permalink
Remove Widgets library
Browse files Browse the repository at this point in the history
A combination of the main library + view binding should be the
primary way to use the library now.
  • Loading branch information
chrisbanes committed May 25, 2021
1 parent 6f5268d commit 8c7cc45
Show file tree
Hide file tree
Showing 37 changed files with 11 additions and 2,683 deletions.
14 changes: 2 additions & 12 deletions docs/dbx.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
Expand Down Expand Up @@ -137,16 +137,6 @@ There is currently just one edge-to-edge attribute:
}
```

## When should I use this vs the widgets library?

The behavior enabled through the [widgets](../widgets) library is similar to that provided by
the this library, but without the requirement of using [data-binding][databinding].
If you're already using [data-binding][databinding] I recommend using the dbx library and it's
binding adapters, since they work with any view type.

However, if you do not use [data-binding][databinding] and do not wish to do so, the widgets library
provides very similar functionality at the cost of having to migrate to the insetter widget types.

[databinding]: https://developer.android.com/topic/libraries/data-binding
[cl]: https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintLayout.html
[swi]: https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat.html#getSystemWindowInsets()
Expand Down
30 changes: 3 additions & 27 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,30 +57,7 @@ This primarily contains binding adapters, which allow access to the helper funct

### [Widgets](widgets/)

An extension library which provides versions of commonly used ViewGroups with enhanced inset
handling. Currently this library is focusing on building upon
[`ConstraintLayout`](https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintLayout.html).

A example of a widget is [InsetterConstraintLayout][icl],
which enables new attributes to define inset behavior on child views:

``` xml
<dev.chrisbanes.insetter.widgets.constraintlayout.InsetterConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:paddingSystemWindowInsets="left|top|right|bottom"
android:src="@drawable/rectangle" />

</dev.chrisbanes.insetter.widgets.constraintlayout.InsetterConstraintLayout>
```

📖 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

Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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/
246 changes: 0 additions & 246 deletions docs/widgets.md

This file was deleted.

13 changes: 6 additions & 7 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ repo_url: 'https://github.com/chrisbanes/insetter'
# Navigation
nav:
- 'Overview': index.md
- 'Main library': library.md
- 'DBX': dbx.md
- 'Widgets': widgets.md
- 'API':
- 'Main library': api/library/library/dev.chrisbanes.insetter/
- 'DBX': api/dbx/dbx/dev.chrisbanes.insetter/
- 'Widgets': api/widgets/widgets/
- 'Main library':
- 'Guide': library.md
- 'API': api/library/library/dev.chrisbanes.insetter/
- 'DBX':
- 'Guide': dbx.md
- 'API': api/dbx/dbx/dev.chrisbanes.insetter/
- 'Contributing': contributing.md
# Configuration
theme:
Expand Down
1 change: 0 additions & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ android {
dependencies {
implementation project(':library')
implementation project(':dbx')
implementation project(':widgets')

api Libs.Kotlin.stdlib
}
20 changes: 0 additions & 20 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,6 @@
</intent-filter>
</activity>

<activity
android:name=".InsetterConstraintLayoutSample"
android:label="InsetterConstraintLayout"
android:theme="@style/AppTheme.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="dev.chrisbanes.insetter.sample.SAMPLE_CODE" />
</intent-filter>
</activity>

<activity
android:name=".InsetterConstraintHelperSample"
android:label="InsetterConstraintHelper"
android:theme="@style/AppTheme.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="dev.chrisbanes.insetter.sample.SAMPLE_CODE" />
</intent-filter>
</activity>

</application>

</manifest>
Loading

0 comments on commit 8c7cc45

Please sign in to comment.