├── corbind-bom
├── .gitignore
├── README.md
├── gradle.properties
├── proguard-rules.pro
└── build.gradle.kts
├── sample
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── values-night
│ │ │ ├── config.xml
│ │ │ └── colors.xml
│ │ ├── values-notnight-v27
│ │ │ ├── config.xml
│ │ │ └── colors.xml
│ │ ├── values-notnight-v23
│ │ │ └── colors.xml
│ │ ├── values
│ │ │ ├── config.xml
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ ├── styles.xml
│ │ │ └── themes.xml
│ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── values-v29
│ │ │ └── themes.xml
│ │ ├── drawable
│ │ │ ├── ic_person_grey_500.xml
│ │ │ ├── ic_email_grey_500.xml
│ │ │ └── ic_lock_grey_500.xml
│ │ └── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ ├── kotlin
│ │ └── ru
│ │ │ └── ldralighieri
│ │ │ └── corbind
│ │ │ └── sample
│ │ │ └── core
│ │ │ └── extensions
│ │ │ ├── Number+toPx.kt
│ │ │ ├── Context+Extensions.kt
│ │ │ └── Activity+Extensions.kt
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle.kts
├── corbind-activity
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── gradle.properties
├── proguard-rules.pro
├── build.gradle.kts
└── README.md
├── corbind-fragment
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── gradle.properties
├── proguard-rules.pro
├── build.gradle.kts
├── README.md
└── api
│ └── corbind-fragment.api
├── corbind
├── .gitignore
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ └── kotlin
│ │ └── ru
│ │ └── ldralighieri
│ │ └── corbind
│ │ ├── internal
│ │ ├── AlwaysTrue.kt
│ │ ├── CorbindReceiveChannel.kt
│ │ └── InitialValueFlow.kt
│ │ └── view
│ │ ├── ViewLayoutChanges.kt
│ │ ├── ViewClicks.kt
│ │ └── ViewTreeObserverDraws.kt
├── gradle.properties
├── proguard-rules.pro
└── build.gradle.kts
├── corbind-core
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── gradle.properties
├── proguard-rules.pro
├── build.gradle.kts
├── README.md
└── api
│ └── corbind-core.api
├── corbind-leanback
├── .gitignore
├── gradle.properties
├── proguard-rules.pro
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── build.gradle.kts
└── README.md
├── corbind-lifecycle
├── .gitignore
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ └── kotlin
│ │ └── ru
│ │ └── ldralighieri
│ │ └── corbind
│ │ └── lifecycle
│ │ └── LifecycleEvents.kt
├── gradle.properties
├── proguard-rules.pro
├── build.gradle.kts
├── README.md
└── api
│ └── corbind-lifecycle.api
├── corbind-material
├── .gitignore
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ └── kotlin
│ │ └── ru
│ │ └── ldralighieri
│ │ └── corbind
│ │ └── material
│ │ ├── SnackbarShown.kt
│ │ ├── SnackbarDismisses.kt
│ │ ├── AppBarLayoutOffsetChanges.kt
│ │ ├── SliderTouches.kt
│ │ ├── MaterialTimePickerNegativeClicks.kt
│ │ ├── MaterialTimePickerPositiveClicks.kt
│ │ ├── MaterialDatePickerNegativeClicks.kt
│ │ ├── MaterialTimePickerDismisses.kt
│ │ ├── RangeSliderTouches.kt
│ │ └── MaterialDatePickerDismisses.kt
├── gradle.properties
├── proguard-rules.pro
└── build.gradle.kts
├── corbind-appcompat
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── gradle.properties
├── proguard-rules.pro
├── build.gradle.kts
└── README.md
├── corbind-drawerlayout
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── gradle.properties
├── proguard-rules.pro
├── build.gradle.kts
├── README.md
└── api
│ └── corbind-drawerlayout.api
├── corbind-navigation
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── gradle.properties
├── proguard-rules.pro
├── build.gradle.kts
├── README.md
└── api
│ └── corbind-navigation.api
├── corbind-recyclerview
├── .gitignore
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ └── kotlin
│ │ └── ru
│ │ └── ldralighieri
│ │ └── corbind
│ │ └── recyclerview
│ │ └── RecyclerViewScrollStateChanges.kt
├── gradle.properties
├── proguard-rules.pro
├── build.gradle.kts
└── README.md
├── corbind-viewpager
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── gradle.properties
├── proguard-rules.pro
├── build.gradle.kts
└── README.md
├── corbind-viewpager2
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── gradle.properties
├── proguard-rules.pro
├── build.gradle.kts
└── README.md
├── corbind-slidingpanelayout
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── gradle.properties
├── proguard-rules.pro
├── build.gradle.kts
├── README.md
└── api
│ └── corbind-slidingpanelayout.api
├── corbind-swiperefreshlayout
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── gradle.properties
├── proguard-rules.pro
├── build.gradle.kts
├── README.md
└── api
│ └── corbind-swiperefreshlayout.api
├── gradle
├── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
└── libs.versions.toml
├── renovate.json
├── spotless
└── copyright.kt
├── .github
└── workflows
│ ├── build.yml
│ └── publish.yml
├── .gitignore
├── gradle.properties
├── settings.gradle.kts
└── gradlew.bat
/corbind-bom/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/sample/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/corbind-activity/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/corbind-fragment/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/corbind/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/corbind-core/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/corbind-leanback/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/corbind-lifecycle/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/corbind-material/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/corbind-appcompat/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/corbind-drawerlayout/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/corbind-navigation/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/corbind-recyclerview/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/corbind-viewpager/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/corbind-viewpager2/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/corbind-slidingpanelayout/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/corbind-swiperefreshlayout/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LDRAlighieri/Corbind/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LDRAlighieri/Corbind/HEAD/sample/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LDRAlighieri/Corbind/HEAD/sample/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LDRAlighieri/Corbind/HEAD/sample/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LDRAlighieri/Corbind/HEAD/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LDRAlighieri/Corbind/HEAD/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LDRAlighieri/Corbind/HEAD/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LDRAlighieri/Corbind/HEAD/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LDRAlighieri/Corbind/HEAD/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LDRAlighieri/Corbind/HEAD/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LDRAlighieri/Corbind/HEAD/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/corbind-bom/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-bom
3 |
4 | Corbind Libraries BOM (Bills of Materials).
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation(platform("ru.ldralighieri.corbind:corbind-bom:2025.09.00"))
9 | }
10 | ```
11 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3 | "extends": [
4 | "config:base"
5 | ],
6 | "prHourlyLimit": 3,
7 | "packageRules": [
8 | {
9 | "description": "Disable updates to SNAPSHOTS",
10 | "matchDatasources": ["maven"],
11 | "allowedVersions": "!/SNAPSHOT$/"
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/sample/src/main/kotlin/ru/ldralighieri/corbind/sample/core/extensions/Number+toPx.kt:
--------------------------------------------------------------------------------
1 | package ru.ldralighieri.corbind.sample.core.extensions
2 |
3 | import android.content.res.Resources
4 | import android.util.TypedValue
5 |
6 | val Number.toPx get() = TypedValue.applyDimension(
7 | /* unit = */ TypedValue.COMPLEX_UNIT_DIP,
8 | /* value = */ toFloat(),
9 | /* metrics = */ Resources.getSystem().displayMetrics
10 | )
--------------------------------------------------------------------------------
/spotless/copyright.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright $YEAR Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 |
--------------------------------------------------------------------------------
/corbind-core/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/corbind-activity/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind-appcompat/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind-fragment/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind-lifecycle/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind-material/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind-navigation/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind-viewpager/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind-viewpager2/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind-drawerlayout/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind-recyclerview/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind-slidingpanelayout/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind-swiperefreshlayout/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/corbind/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind
19 | POM_NAME=Corbind
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-core/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-core
19 | POM_NAME=Corbind (core)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-activity/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-activity
19 | POM_NAME=Corbind (activity)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-appcompat/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-appcompat
19 | POM_NAME=Corbind (appcompat)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-fragment/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2022 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-fragment
19 | POM_NAME=Corbind (fragment)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-leanback/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-leanback
19 | POM_NAME=Corbind (leanback)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-lifecycle/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-lifecycle
19 | POM_NAME=Corbind (lifecycle)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-material/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-material
19 | POM_NAME=Corbind (material)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-viewpager/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-viewpager
19 | POM_NAME=Corbind (viewpager)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-navigation/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-navigation
19 | POM_NAME=Corbind (navigation)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-viewpager2/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-viewpager2
19 | POM_NAME=Corbind (viewpager2)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-drawerlayout/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-drawerlayout
19 | POM_NAME=Corbind (drawerlayout)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-recyclerview/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-recyclerview
19 | POM_NAME=Corbind (recyclerview)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Build
2 |
3 | on:
4 | pull_request:
5 |
6 | jobs:
7 | build:
8 | runs-on: ubuntu-latest
9 | timeout-minutes: 30
10 |
11 | steps:
12 | - name: Checkout
13 | uses: actions/checkout@v5
14 |
15 | - name: Setup JDK
16 | uses: actions/setup-java@v5
17 | with:
18 | distribution: 'zulu'
19 | java-version: 21
20 |
21 | - name: Setup Gradle
22 | uses: gradle/actions/setup-gradle@v5
23 |
24 | - name: Check build-logic
25 | run: ./gradlew check -p build-logic
26 |
27 | - name: Check spotless
28 | run: ./gradlew spotlessCheck --no-configuration-cache
29 |
30 | - name: Build the sample app to verify it works
31 | run: ./gradlew sample:assemble
32 |
--------------------------------------------------------------------------------
/corbind-slidingpanelayout/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-slidingpanelayout
19 | POM_NAME=Corbind (slidingpanelayout)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/corbind-swiperefreshlayout/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2019 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | POM_ARTIFACT_ID=corbind-swiperefreshlayout
19 | POM_NAME=Corbind (swiperefreshlayout)
20 | POM_PACKAGING=aar
21 |
--------------------------------------------------------------------------------
/sample/src/main/res/values-night/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | false
20 |
--------------------------------------------------------------------------------
/corbind-bom/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2023 Vladimir Raupov
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 |
18 | VERSION_NAME=2025.10.00-SNAPSHOT
19 |
20 | POM_ARTIFACT_ID=corbind-bom
21 | POM_NAME=Corbind Libraries BOM
22 | POM_DESCRIPTION=A compatible set of Corbind libraries
23 |
--------------------------------------------------------------------------------
/sample/src/main/res/values-notnight-v27/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | true
20 |
--------------------------------------------------------------------------------
/corbind-bom/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/corbind/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/sample/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/corbind-activity/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/corbind-core/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/corbind-fragment/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/corbind-lifecycle/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/corbind-appcompat/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/corbind-leanback/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/corbind-material/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/corbind-navigation/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/corbind-viewpager/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/corbind-viewpager2/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/corbind-drawerlayout/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/corbind-recyclerview/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/sample/src/main/res/values-notnight-v27/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | @color/system_ui_scrim_light
20 |
21 |
--------------------------------------------------------------------------------
/corbind-leanback/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
19 |
--------------------------------------------------------------------------------
/corbind-slidingpanelayout/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/corbind-swiperefreshlayout/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/sample/src/main/res/values-notnight-v23/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | @color/system_ui_scrim_light
20 |
21 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | true
20 | false
21 |
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/sample/src/main/res/values-v29/themes.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/corbind/src/main/kotlin/ru/ldralighieri/corbind/internal/AlwaysTrue.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package ru.ldralighieri.corbind.internal
18 |
19 | import androidx.annotation.RestrictTo
20 |
21 | @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
22 | object AlwaysTrue : () -> Boolean, (Any) -> Boolean {
23 | override fun invoke() = true
24 | override fun invoke(ignored: Any) = true
25 | }
26 |
--------------------------------------------------------------------------------
/sample/src/main/kotlin/ru/ldralighieri/corbind/sample/core/extensions/Context+Extensions.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package ru.ldralighieri.corbind.sample.core.extensions
18 |
19 | import android.content.Context
20 | import android.view.inputmethod.InputMethodManager
21 |
22 | val Context.inputMethodManager: InputMethodManager?
23 | get() = getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager
24 |
--------------------------------------------------------------------------------
/corbind-core/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.core"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.core)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-material/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.material"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.material)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-activity/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.activity"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.activity)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-fragment/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.fragment"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.fragment)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-leanback/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.leanback"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.leanback)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind"
26 | }
27 |
28 | dependencies {
29 | api(libs.kotlin.coroutines.android)
30 | api(libs.androidx.annotation)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-appcompat/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.appcompat"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.appcompat)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-navigation/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.navigation"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.navigation)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-viewpager/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.viewpager"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.viewpager)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-viewpager2/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.viewpager2"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.viewpager2)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-drawerlayout/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.drawerlayout"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.drawerlayout)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-lifecycle/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.lifecycle"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.lifecycle.runtime)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-recyclerview/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.recyclerview"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.recyclerview)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-lifecycle/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-lifecycle
3 |
4 | To add androidx lifecycle bindings, import `corbind-lifecycle` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-lifecycle:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |---------------|------------------------------|-----------------------------------------|
16 | | **Lifecycle** | [`events`][Lifecycle_events] | Called when any lifecycle event change. |
17 |
18 | ## Simple examples
19 |
20 | ```kotlin
21 | lifecycle.events() // Flow
22 | .filter { it == Lifecycle.Event.ON_RESUME }
23 | .onEach { /* handle lifecycle onResume event */ }
24 | .flowWithLifecycle(lifecycle)
25 | .launchIn(lifecycleScope) // lifecycle-runtime-ktx
26 | ```
27 |
28 | More examples in source code
29 |
30 | [Lifecycle_events]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-lifecycle/src/main/kotlin/ru/ldralighieri/corbind/lifecycle/LifecycleEvents.kt
31 |
--------------------------------------------------------------------------------
/corbind-slidingpanelayout/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.slidingpanelayout"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.slidingpanelayout)
31 | }
32 |
--------------------------------------------------------------------------------
/corbind-swiperefreshlayout/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | alias(libs.plugins.corbind.library)
19 | alias(libs.plugins.corbind.spotless)
20 | alias(libs.plugins.corbind.dokka)
21 | alias(libs.plugins.corbind.maven.publish)
22 | }
23 |
24 | android {
25 | namespace = "ru.ldralighieri.corbind.swiperefreshlayout"
26 | }
27 |
28 | dependencies {
29 | api(projects.corbind)
30 | api(libs.androidx.swiperefreshlayout)
31 | }
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 | *.aab
5 |
6 | # Files for the ART/Dalvik VM
7 | *.dex
8 |
9 | # Java class files
10 | *.class
11 |
12 | # Generated files
13 | bin/
14 | gen/
15 | out/
16 |
17 | # Gradle files
18 | .gradle/
19 | build/
20 |
21 | # Local configuration file (sdk path, etc)
22 | local.properties
23 |
24 | # Proguard folder generated by Eclipse
25 | proguard/
26 |
27 | # Log Files
28 | *.log
29 |
30 | # Android Studio Navigation editor temp files
31 | .navigation/
32 |
33 | # Android Studio captures folder
34 | captures/
35 |
36 | # IntelliJ
37 | *.iml
38 | .idea/*
39 |
40 | # Keystore files
41 | #*.jks
42 | #*.keystore
43 |
44 | # External native build folder generated in Android Studio 2.2 and later
45 | .externalNativeBuild
46 |
47 | # Google Services (e.g. APIs or Firebase)
48 | google-services.json
49 |
50 | # Freeline
51 | freeline.py
52 | freeline/
53 | freeline_project_description.json
54 |
55 | # fastlane
56 | fastlane/report.xml
57 | fastlane/Preview.html
58 | fastlane/screenshots
59 | fastlane/test_output
60 | fastlane/readme.md
61 |
62 | # Mac OS
63 | .DS_Store
64 |
--------------------------------------------------------------------------------
/corbind/src/main/kotlin/ru/ldralighieri/corbind/internal/CorbindReceiveChannel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package ru.ldralighieri.corbind.internal
18 |
19 | import androidx.annotation.RestrictTo
20 | import kotlinx.coroutines.channels.Channel
21 | import kotlinx.coroutines.channels.ReceiveChannel
22 |
23 | @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
24 | inline fun corbindReceiveChannel(
25 | capacity: Int = Channel.RENDEZVOUS,
26 | block: Channel.() -> Unit,
27 | ): ReceiveChannel = Channel(capacity).apply(block)
28 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/ic_person_grey_500.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
22 |
25 |
26 |
--------------------------------------------------------------------------------
/corbind-lifecycle/api/corbind-lifecycle.api:
--------------------------------------------------------------------------------
1 | public final class ru/ldralighieri/corbind/lifecycle/LifecycleEventsKt {
2 | public static final fun events (Landroidx/lifecycle/Lifecycle;)Lkotlinx/coroutines/flow/Flow;
3 | public static final fun events (Landroidx/lifecycle/Lifecycle;ILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
4 | public static final fun events (Landroidx/lifecycle/Lifecycle;Lkotlinx/coroutines/CoroutineScope;I)Lkotlinx/coroutines/channels/ReceiveChannel;
5 | public static final fun events (Landroidx/lifecycle/Lifecycle;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function2;)V
6 | public static synthetic fun events$default (Landroidx/lifecycle/Lifecycle;ILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
7 | public static synthetic fun events$default (Landroidx/lifecycle/Lifecycle;Lkotlinx/coroutines/CoroutineScope;IILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
8 | public static synthetic fun events$default (Landroidx/lifecycle/Lifecycle;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function2;ILjava/lang/Object;)V
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/sample/src/main/kotlin/ru/ldralighieri/corbind/sample/core/extensions/Activity+Extensions.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package ru.ldralighieri.corbind.sample.core.extensions
18 |
19 | import android.app.Activity
20 | import android.view.inputmethod.InputMethodManager
21 |
22 | fun Activity.hideSoftInput() {
23 | val imm: InputMethodManager? = inputMethodManager
24 | val currentFocus = currentFocus
25 | if (currentFocus != null && imm != null) {
26 | imm.hideSoftInputFromWindow(currentFocus.windowToken, 0)
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/ic_email_grey_500.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
22 |
25 |
26 |
--------------------------------------------------------------------------------
/corbind-core/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-core
3 |
4 | To add androidx core bindings, import `corbind-core` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-core:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |----------------------|-------------------------------------------------------------|----------------------------------------------------|
16 | | **NestedScrollView** | [`scrollChangeEvents`][NestedScrollView_scrollChangeEvents] | Called when the scroll position of a view changes. |
17 |
18 | ## Example
19 |
20 | ```kotlin
21 | scrollView.scrollChangeEvents() // Flow
22 | .onEach { /* handle scroll change events */ }
23 | .flowWithLifecycle(lifecycle)
24 | .launchIn(lifecycleScope) // lifecycle-runtime-ktx
25 | ```
26 |
27 | More examples in source code
28 |
29 | [NestedScrollView_scrollChangeEvents]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-core/src/main/kotlin/ru/ldralighieri/corbind/core/NestedScrollViewScrollChangeEvents.kt
30 |
--------------------------------------------------------------------------------
/corbind-swiperefreshlayout/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-swiperefreshlayout
3 |
4 | To add androidx swiperefreshlayout bindings, import `corbind-swiperefreshlayout` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-swiperefreshlayout:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |------------------------|---------------------------------------------|-----------------------------------------------------------------|
16 | | **SwipeRefreshLayout** | [`refreshes`][SwipeRefreshLayout_refreshes] | Called when a swipe gesture triggers a refresh. open or closed. |
17 |
18 | ## Example
19 |
20 | ```kotlin
21 | swipe.refreshes() // Flow
22 | .onEach { /* handle refresh events */ }
23 | .flowWithLifecycle(lifecycle)
24 | .launchIn(lifecycleScope) // lifecycle-runtime-ktx
25 | ```
26 |
27 | More examples in source code
28 |
29 | [SwipeRefreshLayout_refreshes]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-swiperefreshlayout/src/main/kotlin/ru/ldralighieri/corbind/swiperefreshlayout/SwipeRefreshLayoutRefreshes.kt
30 |
--------------------------------------------------------------------------------
/corbind-drawerlayout/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-drawerlayout
3 |
4 | To add androidx drawerlayout bindings, import `corbind-drawerlayout` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-drawerlayout:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |------------------|-------------------------------------------|-----------------------------------------------------------------------|
16 | | **DrawerLayout** | [`drawerOpens`][DrawerLayout_drawerOpens] | Called when a drawer has settled in a completely open or close state. |
17 |
18 | ## Example
19 |
20 | ```kotlin
21 | drawer.drawerOpens() // Flow
22 | .onEach { isOpen ->
23 | tvMessage = "Drawer completely ${ if (isOpen) "open" else "close"}"
24 | }
25 | .flowWithLifecycle(lifecycle)
26 | .launchIn(lifecycleScope) // lifecycle-runtime-ktx
27 | ```
28 |
29 | More examples in source code
30 |
31 | [DrawerLayout_drawerOpens]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-drawerlayout/src/main/kotlin/ru/ldralighieri/corbind/drawerlayout/DrawerLayoutDrawerOpen.kt
32 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/ic_lock_grey_500.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
22 |
25 |
26 |
--------------------------------------------------------------------------------
/corbind-core/api/corbind-core.api:
--------------------------------------------------------------------------------
1 | public final class ru/ldralighieri/corbind/core/NestedScrollViewScrollChangeEventsKt {
2 | public static final fun scrollChangeEvents (Landroidx/core/widget/NestedScrollView;)Lkotlinx/coroutines/flow/Flow;
3 | public static final fun scrollChangeEvents (Landroidx/core/widget/NestedScrollView;ILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
4 | public static final fun scrollChangeEvents (Landroidx/core/widget/NestedScrollView;Lkotlinx/coroutines/CoroutineScope;I)Lkotlinx/coroutines/channels/ReceiveChannel;
5 | public static final fun scrollChangeEvents (Landroidx/core/widget/NestedScrollView;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function2;)V
6 | public static synthetic fun scrollChangeEvents$default (Landroidx/core/widget/NestedScrollView;ILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
7 | public static synthetic fun scrollChangeEvents$default (Landroidx/core/widget/NestedScrollView;Lkotlinx/coroutines/CoroutineScope;IILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
8 | public static synthetic fun scrollChangeEvents$default (Landroidx/core/widget/NestedScrollView;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function2;ILjava/lang/Object;)V
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/corbind-drawerlayout/api/corbind-drawerlayout.api:
--------------------------------------------------------------------------------
1 | public final class ru/ldralighieri/corbind/drawerlayout/DrawerLayoutDrawerOpenKt {
2 | public static final fun drawerOpens (Landroidx/drawerlayout/widget/DrawerLayout;I)Lru/ldralighieri/corbind/internal/InitialValueFlow;
3 | public static final fun drawerOpens (Landroidx/drawerlayout/widget/DrawerLayout;IILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
4 | public static final fun drawerOpens (Landroidx/drawerlayout/widget/DrawerLayout;Lkotlinx/coroutines/CoroutineScope;II)Lkotlinx/coroutines/channels/ReceiveChannel;
5 | public static final fun drawerOpens (Landroidx/drawerlayout/widget/DrawerLayout;Lkotlinx/coroutines/CoroutineScope;IILkotlin/jvm/functions/Function2;)V
6 | public static synthetic fun drawerOpens$default (Landroidx/drawerlayout/widget/DrawerLayout;IILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
7 | public static synthetic fun drawerOpens$default (Landroidx/drawerlayout/widget/DrawerLayout;Lkotlinx/coroutines/CoroutineScope;IIILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
8 | public static synthetic fun drawerOpens$default (Landroidx/drawerlayout/widget/DrawerLayout;Lkotlinx/coroutines/CoroutineScope;IILkotlin/jvm/functions/Function2;ILjava/lang/Object;)V
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/corbind-fragment/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-fragment
3 |
4 | To add androidx fragment bindings, import `corbind-fragment` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-fragment:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |---------------------|------------------------------------------------|-----------------------------------------------------------------------------|
16 | | **FragmentManager** | [`resultEvents`][FragmentManager_resultEvents] | Called when any results set by setFragmentResult using the same requestKey. |
17 |
18 | ## Simple examples
19 |
20 | ```kotlin
21 | lifecycleScope.launchWhenStarted {
22 | parentFragmentManager.resultEvents(
23 | requestKey = FRAGMENT_REQUEST_KEY,
24 | lifecycleOwner = this@CurrentFragment
25 | ) // Flow
26 | .onEach { event -> /* handle result event */ }
27 | .launchIn(this@launchWhenStarted) // lifecycle-runtime-ktx
28 | }
29 | ```
30 |
31 | More examples in source code
32 |
33 | [FragmentManager_resultEvents]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-fragment/src/main/kotlin/ru/ldralighieri/corbind/fragment/FragmentManagerResultEvents.kt
34 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 | Corbind
20 | CORBIND
21 | signup
22 | Email
23 | Password
24 | at least 8 characters
25 | Successfully logged in
26 | example@mail.com
27 | 12345678
28 | Authorization data cleared
29 |
30 |
31 |
--------------------------------------------------------------------------------
/corbind-swiperefreshlayout/api/corbind-swiperefreshlayout.api:
--------------------------------------------------------------------------------
1 | public final class ru/ldralighieri/corbind/swiperefreshlayout/SwipeRefreshLayoutRefreshesKt {
2 | public static final fun refreshes (Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;)Lkotlinx/coroutines/flow/Flow;
3 | public static final fun refreshes (Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;ILkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
4 | public static final fun refreshes (Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;Lkotlinx/coroutines/CoroutineScope;I)Lkotlinx/coroutines/channels/ReceiveChannel;
5 | public static final fun refreshes (Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function1;)V
6 | public static synthetic fun refreshes$default (Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;ILkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
7 | public static synthetic fun refreshes$default (Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;Lkotlinx/coroutines/CoroutineScope;IILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
8 | public static synthetic fun refreshes$default (Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/corbind/src/main/kotlin/ru/ldralighieri/corbind/internal/InitialValueFlow.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package ru.ldralighieri.corbind.internal
18 |
19 | import androidx.annotation.RestrictTo
20 | import kotlinx.coroutines.CoroutineScope
21 | import kotlinx.coroutines.flow.Flow
22 | import kotlinx.coroutines.flow.StateFlow
23 | import kotlinx.coroutines.flow.drop
24 | import kotlinx.coroutines.flow.onStart
25 | import kotlinx.coroutines.flow.stateIn
26 |
27 | class InitialValueFlow(private val flow: Flow) : Flow by flow {
28 | fun dropInitialValue(): Flow = drop(1)
29 | suspend fun asStateFlow(scope: CoroutineScope): StateFlow = stateIn(scope)
30 | }
31 |
32 | @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
33 | fun Flow.asInitialValueFlow(value: T): InitialValueFlow = InitialValueFlow(
34 | onStart { emit(value) },
35 | )
36 |
--------------------------------------------------------------------------------
/corbind-bom/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | `java-platform`
19 | id("com.vanniktech.maven.publish")
20 | }
21 |
22 | dependencies {
23 | constraints {
24 | api(projects.corbind)
25 | api(projects.corbindActivity)
26 | api(projects.corbindAppcompat)
27 | api(projects.corbindCore)
28 | api(projects.corbindDrawerlayout)
29 | api(projects.corbindFragment)
30 | api(projects.corbindLeanback)
31 | api(projects.corbindLifecycle)
32 | api(projects.corbindMaterial)
33 | api(projects.corbindNavigation)
34 | api(projects.corbindRecyclerview)
35 | api(projects.corbindSlidingpanelayout)
36 | api(projects.corbindSwiperefreshlayout)
37 | api(projects.corbindViewpager)
38 | api(projects.corbindViewpager2)
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Gradle
2 | # https://github.com/Kotlin/dokka/issues/1405
3 | org.gradle.jvmargs=-XX:MaxMetaspaceSize=3G
4 |
5 | # Increase timeout when pushing to Sonatype
6 | systemProp.org.gradle.internal.http.connectionTimeout=120000
7 | systemProp.org.gradle.internal.http.socketTimeout=120000
8 |
9 | # Maven
10 | GROUP=ru.ldralighieri.corbind
11 | VERSION_NAME=1.13.0-SNAPSHOT
12 |
13 | POM_DESCRIPTION=Kotlin Coroutines binding APIs for Android UI widgets.
14 |
15 | POM_URL=https://github.com/LDRAlighieri/Corbind/
16 | POM_SCM_URL=https://github.com/LDRAlighieri/Corbind/
17 | POM_SCM_CONNECTION=scm:git:git://github.com/LDRAlighieri/Corbind.git
18 | POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/LDRAlighieri/Corbind.git
19 |
20 | POM_LICENCE_NAME=The Apache Software License, Version 2.0
21 | POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
22 | POM_LICENCE_DIST=repo
23 |
24 | POM_DEVELOPER_ID=ldralighieri
25 | POM_DEVELOPER_NAME=Vladimir Raupov
26 | POM_DEVELOPER_URL=https://github.com/LDRAlighieri/
27 |
28 | SONATYPE_HOST=CENTRAL_PORTAL
29 | RELEASE_SIGNING_ENABLED=true
30 | SONATYPE_AUTOMATIC_RELEASE=true
31 |
32 | # Android
33 | android.useAndroidX=true
34 | buildTools=36.0.0
35 | compileSdk=36
36 | targetSdk=36
37 | minSdk=21
38 |
39 | # Build features
40 | android.defaults.buildfeatures.resvalues=false
41 | android.defaults.buildfeatures.shaders=false
42 |
43 | # Dokka
44 | org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
45 | org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
46 |
--------------------------------------------------------------------------------
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | name: Publish
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 |
8 | jobs:
9 | deploy:
10 | runs-on: ubuntu-latest
11 | timeout-minutes: 30
12 |
13 | steps:
14 | - name: Checkout
15 | uses: actions/checkout@v5
16 |
17 | - name: Setup JDK
18 | uses: actions/setup-java@v5
19 | with:
20 | distribution: 'zulu'
21 | java-version: 21
22 |
23 | - name: Setup Gradle
24 | uses: gradle/actions/setup-gradle@v5
25 |
26 | - name: Check build-logic
27 | run: ./gradlew check -p build-logic
28 |
29 | - name: Check spotless
30 | run: ./gradlew spotlessCheck --no-configuration-cache
31 |
32 | - name: Build the sample app to verify it works
33 | run: ./gradlew sample:assemble
34 |
35 | - name: Deploy to Sonatype
36 | if: github.event_name == 'push' && github.ref == 'refs/heads/master'
37 | run: |
38 | ./gradlew publish --no-parallel \
39 | --max-workers 1 \
40 | -Dorg.gradle.internal.http.connectionTimeout=120000 \
41 | -Dorg.gradle.internal.http.socketTimeout=120000
42 | env:
43 | ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
44 | ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
45 | ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
46 | ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }}
47 | ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }}
48 |
--------------------------------------------------------------------------------
/sample/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
19 |
20 |
29 |
30 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/corbind-slidingpanelayout/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-slidingpanelayout
3 |
4 | To add androidx slidingpanelayout bindings, import `corbind-slidingpanelayout` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-slidingpanelayout:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |-----------------------|------------------------------------------------|--------------------------------------------------------------------|
16 | | **SlidingPaneLayout** | [`panelOpens`][SlidingPaneLayout_panelOpens] | Called when a sliding pane becomes slid completely open or closed. |
17 | | | [`panelSlides`][SlidingPaneLayout_panelSlides] | Called when a sliding pane's position changes. |
18 |
19 | ## Example
20 |
21 | ```kotlin
22 | slider.panelOpens() // Flow
23 | .onEach { isOpen ->
24 | tvMessage = "Panel completely ${ if (isOpen) "open" else "close"}"
25 | }
26 | .flowWithLifecycle(lifecycle)
27 | .launchIn(lifecycleScope) // lifecycle-runtime-ktx
28 | ```
29 |
30 | More examples in source code
31 |
32 | [SlidingPaneLayout_panelOpens]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-slidingpanelayout/src/main/kotlin/ru/ldralighieri/corbind/slidingpanelayout/SlidingPaneLayoutPaneOpens.kt
33 | [SlidingPaneLayout_panelSlides]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-slidingpanelayout/src/main/kotlin/ru/ldralighieri/corbind/slidingpanelayout/SlidingPaneLayoutSlides.kt
34 |
--------------------------------------------------------------------------------
/corbind-navigation/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-navigation
3 |
4 | To add androidx navigation bindings, import `corbind-navigation` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-navigation:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |-------------------|--------------------------------------------------------------------|----------------------------------------------------------------------|
16 | | **NavController** | [`destinationChanges`][NavController_destinationChanges] | Called when the `NavController` destination or its arguments change. |
17 | | | [`destinationChangeEvents`][NavController_destinationChangeEvents] | A more advanced version of the `destinationChanges`. |
18 |
19 | ## Simple examples
20 |
21 | ```kotlin
22 | navController.destinationChanges() // Flow
23 | .onEach { destination ->
24 | if (destination.id == R.id.fragment_dashboard) {
25 | hideSoftInput()
26 | }
27 | }
28 | .flowWithLifecycle(lifecycle)
29 | .launchIn(lifecycleScope) // lifecycle-runtime-ktx
30 | ```
31 |
32 | More examples in source code
33 |
34 | [NavController_destinationChanges]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-navigation/src/main/kotlin/ru/ldralighieri/corbind/navigation/NavControllerOnDestinationChanges.kt
35 | [NavController_destinationChangeEvents]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-navigation/src/main/kotlin/ru/ldralighieri/corbind/navigation/NavControllerOnDestinationChangeEvents.kt
36 |
--------------------------------------------------------------------------------
/sample/src/main/res/values-night/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 | #EF5350
22 | #C2185B
23 | #C2185B
24 | #000000
25 |
26 | #C86470
27 | #C86470
28 | #FFFFFF
29 |
30 | #000
31 | #FFF
32 |
33 | #121212
34 | #FFFFFF
35 |
36 | #CF6679
37 | #000000
38 |
39 |
40 | #2EFFFFFF
41 | #B3000000
42 |
43 | @android:color/transparent
44 |
45 |
46 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | @file:Suppress("UnstableApiUsage")
18 |
19 | pluginManagement {
20 | includeBuild("build-logic")
21 | repositories {
22 | google()
23 | mavenCentral()
24 | gradlePluginPortal()
25 | }
26 | }
27 |
28 | dependencyResolutionManagement {
29 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
30 | repositories {
31 | google()
32 | mavenCentral()
33 | }
34 | }
35 |
36 | // https://github.com/gradle/gradle/issues/16608
37 | rootProject.name = "CorbindProject"
38 |
39 | include(":corbind-bom")
40 |
41 | include(":corbind")
42 | include(":corbind-activity")
43 | include(":corbind-appcompat")
44 | include(":corbind-core")
45 | include(":corbind-drawerlayout")
46 | include(":corbind-fragment")
47 | include(":corbind-leanback")
48 | include(":corbind-lifecycle")
49 | include(":corbind-material")
50 | include(":corbind-navigation")
51 | include(":corbind-recyclerview")
52 | include(":corbind-slidingpanelayout")
53 | include(":corbind-swiperefreshlayout")
54 | include(":corbind-viewpager")
55 | include(":corbind-viewpager2")
56 |
57 | include(":sample")
58 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 | #03A9F4
22 | #1976D2
23 | #1976D2
24 | #FFFFFF
25 |
26 | #64B5F6
27 | #64B5F6
28 | #000000
29 |
30 | #FFF
31 | #000
32 |
33 | #E0E0E0
34 | #000
35 |
36 | #CF6679
37 | #000000
38 |
39 |
40 | #B3FFFFFF
41 | #40000000
42 |
43 | @color/system_ui_scrim_black
44 | @color/system_ui_scrim_black
45 |
46 |
47 |
--------------------------------------------------------------------------------
/corbind-leanback/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-leanback
3 |
4 | To add androidx leanback bindings, import `corbind-leanback` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-leanback:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |--------------------|----------------------------------------------------------------|-----------------------------------------------------------|
16 | | **SearchBar** | [`searchQueryChanges`][SearchBar_searchQueryChanges] | Called when the search bar detects a change in the query. |
17 | | | [`searchQueryChangeEvents`][SearchBar_searchQueryChangeEvents] | A more advanced version of the `searchQueryChanges`. |
18 | | **SearchEditText** | [`keyboardDismisses`][SearchEditText_keyboardDismisses] | Called when the keyboard is dismissed. |
19 |
20 | ## Example
21 |
22 | ```kotlin
23 | search.searchQueryChanges() // Flow
24 | .map { it.toLowerCase(Locale.getDefault()) }
25 | .onEach { query -> filter.updateItems(query) }
26 | .flowWithLifecycle(lifecycle)
27 | .launchIn(lifecycleScope) // lifecycle-runtime-ktx
28 | ```
29 |
30 | More examples in source code
31 |
32 | [SearchBar_searchQueryChanges]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-leanback/src/main/kotlin/ru/ldralighieri/corbind/leanback/SearchBarSearchQueryChanges.kt
33 | [SearchBar_searchQueryChangeEvents]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-leanback/src/main/kotlin/ru/ldralighieri/corbind/leanback/SearchBarSearchQueryChangeEvents.kt
34 | [SearchEditText_keyboardDismisses]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-leanback/src/main/kotlin/ru/ldralighieri/corbind/leanback/SearchEditTextKeyboardDismisses.kt
35 |
--------------------------------------------------------------------------------
/corbind-viewpager/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-viewpager
3 |
4 | To add androidx viewpager bindings, import `corbind-viewpager` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-viewpager:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |---------------|--------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
16 | | **ViewPager** | [`pageScrollEvents`][ViewPager_pageScrollEvents] | Called when the current page is scrolled, either as part of a programmatically initiated smooth scroll or a user initiated touch scroll. |
17 | | | [`pageScrollStateChanges`][ViewPager_pageScrollStateChanges] | Called when the scroll state changes. |
18 | | | [`pageSelections`][ViewPager_pageSelections] | Called when a new page becomes selected. |
19 |
20 | ## Example
21 |
22 | ```kotlin
23 | vpSlides.pageSelections() // Flow
24 | .onEach { tvMessage = "Page #$it selected" }
25 | .flowWithLifecycle(lifecycle)
26 | .launchIn(lifecycleScope) // lifecycle-runtime-ktx
27 | ```
28 |
29 | More examples in source code
30 |
31 | [ViewPager_pageScrollEvents]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-viewpager/src/main/kotlin/ru/ldralighieri/corbind/viewpager/ViewPagerPageScrollEvents.kt
32 | [ViewPager_pageScrollStateChanges]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-viewpager/src/main/kotlin/ru/ldralighieri/corbind/viewpager/ViewPagerPageScrollStateChanges.kt
33 | [ViewPager_pageSelections]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-viewpager/src/main/kotlin/ru/ldralighieri/corbind/viewpager/ViewPagerPageSelections.kt
34 |
--------------------------------------------------------------------------------
/corbind-viewpager2/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-viewpager2
3 |
4 | To add androidx viewpager2 bindings, import `corbind-viewpager2` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-viewpager2:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |----------------|---------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
16 | | **ViewPager2** | [`pageScrollEvents`][ViewPager2_pageScrollEvents] | Called when the current page is scrolled, either as part of a programmatically initiated smooth scroll or a user initiated touch scroll. |
17 | | | [`pageScrollStateChanges`][ViewPager2_pageScrollStateChanges] | Called when the scroll state changes. |
18 | | | [`pageSelections`][ViewPager2_pageSelections] | Called when a new page becomes selected. |
19 |
20 | ## Simple examples
21 |
22 | ```kotlin
23 | vpSlides.pageSelections() // Flow
24 | .onEach { tvMessage = "Page #$it selected" }
25 | .flowWithLifecycle(lifecycle)
26 | .launchIn(lifecycleScope) // lifecycle-runtime-ktx
27 | ```
28 |
29 | More examples in source code
30 |
31 | [ViewPager2_pageScrollEvents]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-viewpager2/src/main/kotlin/ru/ldralighieri/corbind/viewpager2/ViewPager2PageScrollEvents.kt
32 | [ViewPager2_pageScrollStateChanges]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-viewpager2/src/main/kotlin/ru/ldralighieri/corbind/viewpager2/ViewPager2PageScrollStateChanges.kt
33 | [ViewPager2_pageSelections]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-viewpager2/src/main/kotlin/ru/ldralighieri/corbind/viewpager2/ViewPager2PageSelections.kt
34 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
30 |
31 |
32 |
33 |
34 |
38 |
39 |
40 |
44 |
45 |
46 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/corbind-fragment/api/corbind-fragment.api:
--------------------------------------------------------------------------------
1 | public final class ru/ldralighieri/corbind/fragment/FragmentManagerResultEventsKt {
2 | public static final fun resultEvents (Landroidx/fragment/app/FragmentManager;Ljava/lang/String;Landroidx/lifecycle/LifecycleOwner;)Lkotlinx/coroutines/flow/Flow;
3 | public static final fun resultEvents (Landroidx/fragment/app/FragmentManager;Ljava/lang/String;Landroidx/lifecycle/LifecycleOwner;ILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
4 | public static final fun resultEvents (Landroidx/fragment/app/FragmentManager;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Landroidx/lifecycle/LifecycleOwner;I)Lkotlinx/coroutines/channels/ReceiveChannel;
5 | public static final fun resultEvents (Landroidx/fragment/app/FragmentManager;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Landroidx/lifecycle/LifecycleOwner;ILkotlin/jvm/functions/Function2;)V
6 | public static synthetic fun resultEvents$default (Landroidx/fragment/app/FragmentManager;Ljava/lang/String;Landroidx/lifecycle/LifecycleOwner;ILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
7 | public static synthetic fun resultEvents$default (Landroidx/fragment/app/FragmentManager;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Landroidx/lifecycle/LifecycleOwner;IILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
8 | public static synthetic fun resultEvents$default (Landroidx/fragment/app/FragmentManager;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Landroidx/lifecycle/LifecycleOwner;ILkotlin/jvm/functions/Function2;ILjava/lang/Object;)V
9 | }
10 |
11 | public final class ru/ldralighieri/corbind/fragment/FragmentResultEvent {
12 | public fun (Ljava/lang/String;Landroid/os/Bundle;)V
13 | public final fun component1 ()Ljava/lang/String;
14 | public final fun component2 ()Landroid/os/Bundle;
15 | public final fun copy (Ljava/lang/String;Landroid/os/Bundle;)Lru/ldralighieri/corbind/fragment/FragmentResultEvent;
16 | public static synthetic fun copy$default (Lru/ldralighieri/corbind/fragment/FragmentResultEvent;Ljava/lang/String;Landroid/os/Bundle;ILjava/lang/Object;)Lru/ldralighieri/corbind/fragment/FragmentResultEvent;
17 | public fun equals (Ljava/lang/Object;)Z
18 | public final fun getBundle ()Landroid/os/Bundle;
19 | public final fun getRequestKey ()Ljava/lang/String;
20 | public fun hashCode ()I
21 | public fun toString ()Ljava/lang/String;
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/corbind-activity/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-activity
3 |
4 | To add androidx activity bindings, import `corbind-activity` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-activity:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |-----------------------------|------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|
16 | | **OnBackPressedDispatcher** | [`backPresses`][OnBackPressedDispatcher_backPresses] | Called when OnBackPressedDispatcher.onBackPressed triggered. OnBackPressed events only |
17 | | | [`backProgressed`][OnBackPressedDispatcher_backProgressed] | Called when OnBackPressedDispatcher.dispatchOnBackProgressed triggered. OnBackProgressed event only |
18 | | | [`backEvents`][OnBackPressedDispatcher_backEvents] | Called when any callback event triggered. All events |
19 |
20 | ## Simple examples
21 |
22 | ```kotlin
23 | onBackPressedDispatcher.backEvents(lifecycleOwner = this)
24 | .onEach { event ->
25 | when (event) {
26 | is OnBackPressed -> { /* handle back pressed event */ }
27 | is OnBackCanceled -> { /* handle back cancel event */ }
28 | is OnBackStarted -> { /* handle back started event */ }
29 | is OnBackProgressed -> { /* handle back progressed event */ }
30 | }
31 | }
32 | .flowWithLifecycle(lifecycle)
33 | .launchIn(lifecycleScope) // lifecycle-runtime-ktx
34 | ```
35 |
36 | More examples in source code
37 |
38 | [OnBackPressedDispatcher_backPresses]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-activity/src/main/kotlin/ru/ldralighieri/corbind/activity/OnBackPressedDispatcherBackPresses.kt
39 | [OnBackPressedDispatcher_backProgressed]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-activity/src/main/kotlin/ru/ldralighieri/corbind/activity/OnBackPressedDispatcherBackProgressed.kt
40 | [OnBackPressedDispatcher_backEvents]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-activity/src/main/kotlin/ru/ldralighieri/corbind/activity/OnBackPressedDispatcherOnBackEvents.kt
41 |
--------------------------------------------------------------------------------
/corbind-slidingpanelayout/api/corbind-slidingpanelayout.api:
--------------------------------------------------------------------------------
1 | public final class ru/ldralighieri/corbind/slidingpanelayout/SlidingPaneLayoutPaneOpensKt {
2 | public static final fun panelOpens (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;)Lru/ldralighieri/corbind/internal/InitialValueFlow;
3 | public static final fun panelOpens (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;ILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
4 | public static final fun panelOpens (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;Lkotlinx/coroutines/CoroutineScope;I)Lkotlinx/coroutines/channels/ReceiveChannel;
5 | public static final fun panelOpens (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function2;)V
6 | public static synthetic fun panelOpens$default (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;ILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
7 | public static synthetic fun panelOpens$default (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;Lkotlinx/coroutines/CoroutineScope;IILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
8 | public static synthetic fun panelOpens$default (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function2;ILjava/lang/Object;)V
9 | }
10 |
11 | public final class ru/ldralighieri/corbind/slidingpanelayout/SlidingPaneLayoutSlidesKt {
12 | public static final fun panelSlides (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;)Lkotlinx/coroutines/flow/Flow;
13 | public static final fun panelSlides (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;ILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
14 | public static final fun panelSlides (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;Lkotlinx/coroutines/CoroutineScope;I)Lkotlinx/coroutines/channels/ReceiveChannel;
15 | public static final fun panelSlides (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function2;)V
16 | public static synthetic fun panelSlides$default (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;ILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
17 | public static synthetic fun panelSlides$default (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;Lkotlinx/coroutines/CoroutineScope;IILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
18 | public static synthetic fun panelSlides$default (Landroidx/slidingpanelayout/widget/SlidingPaneLayout;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function2;ILjava/lang/Object;)V
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
23 |
28 |
29 |
35 |
38 |
41 |
42 |
43 |
44 |
50 |
51 |
--------------------------------------------------------------------------------
/corbind-recyclerview/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-recyclerview
3 |
4 | To add androidx recyclerview bindings, import `corbind-recyclerview` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-recyclerview:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |--------------------------|-----------------------------------------------------------------------------|----------------------------------------------------------------------|
16 | | **RecyclerView.Adapter** | [`dataChanges`][RecyclerView_Adapte_dataChanges] | Called when the RecyclerView's adapter data has been changed |
17 | | **RecyclerView** | [`childAttachStateChangeEvents`][RecyclerView_childAttachStateChangeEvents] | Called when a view is attached to or detached from the RecyclerView. |
18 | | | [`flingEvents`][RecyclerView_flingEvents] | Handle a fling given the velocities in both x and y directions |
19 | | | [`scrollEvents`][RecyclerView_scrollEvents] | Called when a scrolling event has occurred on that RecyclerView. |
20 | | | [`scrollStateChanges`][RecyclerView_scrollStateChanges] | Called when RecyclerView's scroll state changes. |
21 |
22 | ## Example
23 |
24 | ```kotlin
25 | rv.scrollStateChanges() // Flow
26 | .onEach { /* handle RecyclerView scroll state change events */ }
27 | .flowWithLifecycle(lifecycle)
28 | .launchIn(lifecycleScope) // lifecycle-runtime-ktx
29 | ```
30 |
31 | More examples in source code
32 |
33 | [RecyclerView_Adapte_dataChanges]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-recyclerview/src/main/kotlin/ru/ldralighieri/corbind/recyclerview/RecyclerAdapterDataChanges.kt
34 | [RecyclerView_childAttachStateChangeEvents]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-recyclerview/src/main/kotlin/ru/ldralighieri/corbind/recyclerview/RecyclerViewChildAttachStateChangeEvents.kt
35 | [RecyclerView_flingEvents]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-recyclerview/src/main/kotlin/ru/ldralighieri/corbind/recyclerview/RecyclerViewFlingEvents.kt
36 | [RecyclerView_scrollEvents]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-recyclerview/src/main/kotlin/ru/ldralighieri/corbind/recyclerview/RecyclerViewScrollEvents.kt
37 | [RecyclerView_scrollStateChanges]: https://github.com/LDRAlighieri/Corbind/blob/master/corbind-recyclerview/src/main/kotlin/ru/ldralighieri/corbind/recyclerview/RecyclerViewScrollStateChanges.kt
38 |
--------------------------------------------------------------------------------
/sample/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Vladimir Raupov
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | plugins {
18 | id("com.android.application")
19 | id("kotlin-android")
20 | }
21 |
22 | android {
23 | namespace = "ru.ldralighieri.corbind.sample"
24 |
25 | val buildTools: String by project
26 | val compileSdk: String by project
27 | val minSdk: String by project
28 | val targetSdk: String by project
29 | @Suppress("LocalVariableName") val VERSION_NAME: String by project
30 |
31 | buildToolsVersion = buildTools
32 |
33 | this.compileSdk = compileSdk.toInt()
34 | defaultConfig {
35 | applicationId = "ru.ldralighieri.corbind.example"
36 | this.minSdk = minSdk.toInt()
37 | this.targetSdk = targetSdk.toInt()
38 | versionCode = 1
39 | versionName = VERSION_NAME
40 |
41 | vectorDrawables.useSupportLibrary = true
42 | }
43 |
44 | buildTypes {
45 | val debug by getting {
46 | isDebuggable = true
47 | isMinifyEnabled = false
48 | isShrinkResources = false
49 | }
50 |
51 | release {
52 | isDebuggable = false
53 | isMinifyEnabled = true
54 | isShrinkResources = true
55 | signingConfig = debug.signingConfig
56 | proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
57 | }
58 | }
59 |
60 | compileOptions {
61 | sourceCompatibility = JavaVersion.VERSION_21
62 | targetCompatibility = JavaVersion.VERSION_21
63 | }
64 |
65 | packaging {
66 | resources.excludes.apply {
67 | add("META-INF/NOTICE")
68 | add("META-INF/NOTICE.txt")
69 | add("META-INF/notice.txt")
70 | add("META-INF/LICENSE")
71 | add("META-INF/LICENSE.txt")
72 | add("META-INF/license.txt")
73 | add("META-INF/atomicfu.kotlin_module")
74 | }
75 | }
76 |
77 | buildFeatures { viewBinding = true }
78 | }
79 |
80 | dependencies {
81 | implementation(projects.corbindSwiperefreshlayout)
82 | implementation(projects.corbindActivity)
83 |
84 | implementation(libs.androidx.appcompat)
85 | implementation(libs.androidx.lifecycle.runtime)
86 | implementation(libs.androidx.constraintlayout)
87 | implementation(libs.material)
88 | }
89 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 | @rem SPDX-License-Identifier: Apache-2.0
17 | @rem
18 |
19 | @if "%DEBUG%"=="" @echo off
20 | @rem ##########################################################################
21 | @rem
22 | @rem Gradle startup script for Windows
23 | @rem
24 | @rem ##########################################################################
25 |
26 | @rem Set local scope for the variables with windows NT shell
27 | if "%OS%"=="Windows_NT" setlocal
28 |
29 | set DIRNAME=%~dp0
30 | if "%DIRNAME%"=="" set DIRNAME=.
31 | @rem This is normally unused
32 | set APP_BASE_NAME=%~n0
33 | set APP_HOME=%DIRNAME%
34 |
35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
37 |
38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
40 |
41 | @rem Find java.exe
42 | if defined JAVA_HOME goto findJavaFromJavaHome
43 |
44 | set JAVA_EXE=java.exe
45 | %JAVA_EXE% -version >NUL 2>&1
46 | if %ERRORLEVEL% equ 0 goto execute
47 |
48 | echo. 1>&2
49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50 | echo. 1>&2
51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52 | echo location of your Java installation. 1>&2
53 |
54 | goto fail
55 |
56 | :findJavaFromJavaHome
57 | set JAVA_HOME=%JAVA_HOME:"=%
58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
59 |
60 | if exist "%JAVA_EXE%" goto execute
61 |
62 | echo. 1>&2
63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64 | echo. 1>&2
65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66 | echo location of your Java installation. 1>&2
67 |
68 | goto fail
69 |
70 | :execute
71 | @rem Setup the command line
72 |
73 |
74 |
75 | @rem Execute Gradle
76 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
77 |
78 | :end
79 | @rem End local scope for the variables with windows NT shell
80 | if %ERRORLEVEL% equ 0 goto mainEnd
81 |
82 | :fail
83 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
84 | rem the _cmd.exe /c_ return code!
85 | set EXIT_CODE=%ERRORLEVEL%
86 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
87 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
88 | exit /b %EXIT_CODE%
89 |
90 | :mainEnd
91 | if "%OS%"=="Windows_NT" endlocal
92 |
93 | :omega
94 |
--------------------------------------------------------------------------------
/corbind-appcompat/README.md:
--------------------------------------------------------------------------------
1 |
2 | # corbind-appcompat
3 |
4 | To add androidx appcompat bindings, import `corbind-appcompat` module:
5 |
6 | ```kotlin
7 | dependencies {
8 | implementation("ru.ldralighieri.corbind:corbind-appcompat:1.12.0")
9 | }
10 | ```
11 |
12 | ## List of extensions
13 |
14 | | Component | Extension | Description |
15 | |--------------------|-------------------------------------------------------------|-----------------------------------------------------------------------------------------|
16 | | **ActionMenuView** | [`itemClicks`][ActionMenuView_itemClicks] | Called when a menu item is clicked if the item itself did not already handle the event. |
17 | | **PopupMenu** | [`dismisses`][PopupMenu_dismisses] | Called when the associated menu has been dismissed. |
18 | | | [`itemClicks`][PopupMenu_itemClicks] | Called when a menu item is clicked if the item itself did not already handle the event. |
19 | | **SearchView** | [`queryTextChanges`][SearchView_queryTextChanges] | Called when the query text is changed by the user. |
20 | | | [`queryTextChangeEvents`][SearchView_queryTextChangeEvents] | A more advanced version of the `queryTextChanges`. |
21 | | **Toolbar** | [`itemClicks`][Toolbar_itemClicks] | Called when a menu item is clicked if the item itself did not already handle the event. |
22 | | | [`navigationClicks`][Toolbar_navigationClicks] | Called whenever the user clicks the navigation button at the start of the toolbar. |
23 |
24 | ## Example
25 |
26 | ```kotlin
27 | toolbar.itemClicks() // Flow