Categories
How to listen for changes to an int in RxJava?
There is a variable int counterr = 0; There is a loop
int counterr = 0;
for (int i=1;i<100;i++) { counter++; }
counterr
Answer the question
In order to leave comments, you need to log in
For reference
PublishSubject<Integer> counterSubject = PublishSubject.create(); counterSubject.subscribe(new Action1<Integer>() { @Override public void call(Integer integer) { // слушать тут } }); for (int i=1;i<100;i++) { counterSubject.onNext(i); //менять так }
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question