android - Delay onComplete() in Observable -


i doing this:

return observable.zip(     observable.interval(0, move_length_in_millis, timeunit.milliseconds),     observable.fromiterable(mysupernicearraylist),         new bifunction<long, itemtest, itemtest>() {             @override             public itemtest apply(@nonnull long along, @nonnull itemtest itemtest) throws exception {                   return itemtest;             }         } ) 

the problem have after last item emitted, oncomplete called. there way postpone/delay call of oncomplete method?

hacky solution add 1 more element arraylist , ignore in onnext().

concat entire zip empty observable delayed:

return observable.zip(     observable.interval(0, move_length_in_millis, timeunit.milliseconds),     observable.fromiterable(mysupernicearraylist),         new bifunction<long, itemtest, itemtest>() {             @override             public itemtest apply(@nonnull long along,                      @nonnull itemtest itemtest) throws exception {                 return itemtest;             }         } ).concatwith(observable.<itemtest>empty()                  .delay(move_length_in_millis, timeunit.milliseconds)); 

edit delay should happen after zip.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -