gazman-sdk / signals Goto Github PK
View Code? Open in Web Editor NEWA light library to build events in a smart Signal way
License: Apache License 2.0
A light library to build events in a smart Signal way
License: Apache License 2.0
Good afternoon Sir!
Would it be possible to also publish a Maven Version of this wonderful library?
Thanks in advance
Removing a listener does not work at all.
Log.d(TAG, "---------------Test 1------------")
val sig = Signals.localSignal(TestSignal1::class)
Log.d(TAG, "BEFORE has: ${sig.hasListeners()}") // false
sig.addListener(::testSig)
Log.d(TAG, "AFTER ADD has: ${sig.hasListeners()}") // true
sig.removeListener(::testSig)
Log.d(TAG, "AFTER REMOVE has: ${sig.hasListeners()}") // true
Log.d(TAG, "---------------Test 2------------")
val sig2 = Signals.localSignal(TestSignal2::class)
Log.d(TAG, "BEFORE has: ${sig2.hasListeners()}") // false
sig2.addListener { s -> Log.d("test", s) }
Log.d(TAG, "AFTER ADD has: ${sig2.hasListeners()}") // true
sig2.removeListener { s -> Log.d("test", s) }
Log.d(TAG, "AFTER REMOVE has: ${sig2.hasListeners()}") // true
Log.d(TAG, "---------------Test 3------------")
val sig3 = Signals.signal(TestSignal3::class)
Log.d(TAG, "BEFORE has: ${sig3.hasListeners()}") // false
sig3.addListener(::testSig)
Log.d(TAG, "AFTER ADD has: ${sig3.hasListeners()}") // true
sig3.removeListener(::testSig)
Log.d(TAG, "AFTER REMOVE has: ${sig3.hasListeners()}") // true
Log.d(TAG, "---------------Test 4------------")
val sig4 = Signals.signal(TestSignal4::class)
Log.d(TAG, "BEFORE has: ${sig4.hasListeners()}") // false
sig4.addListener { s -> Log.d("test", s) }
Log.d(TAG, "AFTER ADD has: ${sig4.hasListeners()}") // true
sig4.removeListener { s -> Log.d("test", s) }
Log.d(TAG, "AFTER REMOVE has: ${sig4.hasListeners()}") // true
fun testSig(s: String) {
}
fun interface TestSignal1 {
fun test(s: String)
}
fun interface TestSignal2 {
fun test(s: String)
}
fun interface TestSignal3 {
fun test(s: String)
}
fun interface TestSignal4 {
fun test(s: String)
}
---------------Test 1------------
BEFORE has: false
AFTER ADD has: true
AFTER REMOVE has: true
---------------Test 2------------
BEFORE has: false
AFTER ADD has: true
AFTER REMOVE has: true
---------------Test 3------------
BEFORE has: false
AFTER ADD has: true
AFTER REMOVE has: true
---------------Test 4------------
BEFORE has: false
AFTER ADD has: true
AFTER REMOVE has: true
This library doesn't work on Samsung devices, doesn't allow to install apk, says it conflicts with an existing package
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.