RxDatabindings
RxJava2 & 3 extensions for Android Databindings library
Install / Use
/learn @stepango/RxDatabindingsREADME
RxDatabindings
RxJava 2 & 3 extensions for Android Databindings library
Add RxDataBindings to your build.gradle
implementation "com.stepango.rxdatabindings:rxdatabindings:3.0.0"
Basic example of usage:
interface ViewModelState : Parcelable {
val text: ObservableString
val counter: ObservableInt
}
@Parcelize
data class ViewModelStateImpl(
override val text: ObservableString = ObservableString(),
override val counter: ObservableInt = ObservableInt()
) : ViewModelState
class ViewModel(val state: ViewModelState) : ViewModelState by state {
init {
counter.observe()
.setTo(text) { "Wow! You count till $it" }
.doOnNext { Log.d("THREAD", Thread.currentThread().name) }
.subscribe()
}
fun incCounter() = counter.inc(10)
fun decCounter() = counter.dec(0)
}
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
