Skip to content

sola1tmy/KDataBinding

Repository files navigation

KDataBinding

Kotlin single file library to bind value and view.

How to use

Config.intValue by canBeBind(this::intValue, 10)
TextView.bindText(Config::intValue)

Config.hasNewVersion:Boolean by SharedPreferenceReadWriteProperty().canBeBind(this, this::hasNewVersion)
ImageView.bind(Config::hasNewVersion) { bool ->
  setImageResource(if(bool) R.drawable.new : R.drawable.empty)
}

About

Kotlin file to bind value and view.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published