Skip to content
Kotlin Databind library
Branch: master
Clone or download
paulocns Merge pull request #2 from johnjohndoe/patch-1
Enable syntax highlighting. Fix minor typo.
Latest commit 3beefda Jul 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea Fix problem with masks on text watcher Apr 18, 2019
app update sample to viewlifecycleowner Mar 15, 2019
gradle/wrapper first commit Mar 4, 2019
kdbcore update version Apr 24, 2019
.gitignore Initial commit Mar 4, 2019
LICENSE Initial commit Mar 4, 2019
README.md Enable syntax highlighting. Fix minor typo. Jul 17, 2019
build.gradle add kdoc to files Mar 14, 2019
gradle.properties first commit Mar 4, 2019
gradlew first commit Mar 4, 2019
gradlew.bat first commit Mar 4, 2019
release.sh code to release to bintray Mar 5, 2019
settings.gradle first commit Mar 4, 2019

README.md

KDB

Kotlin Databind library was made as an alternative to the Android Databind Library, this was constructed to be used with LiveData, so no changes to your ViewModel/Presenter is required to use this.

This library was made using extension function, since there is no code generation, no more hunting through a log to find a error in a 1000 errors log.

Adding to project

To use it just add it to your app gradle file

implementation 'com.psato.kdbcore:kdb:0.4.0'

Simple usage

Inside a LifeCycleOwner to perform a one way bind just call the method bind

bind(queryViewModelArc.searchEnabled, searchButton::setEnabled)
bind(queryViewModelArc.showLoading){ loadinLayout.present = it} 

To perform a two way bind call the method twoWayBind

twoWayBind(queryViewModelArc.queryValue, queryEditText.bindableText)

License

Copyright 2019 Paulo Vitor Sato

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can’t perform that action at this time.