https://kotlinlang.org logo
#rx
Title
# rx
m

Mohamed Ibrahim

11/14/2019, 8:10 AM
I have splash screen with animation, the animation must be complete then move to the next screen, while doing this I do some api calls and app data setup, I tried to put timeout but other http calls could get earlier .. so animation doesn't complete, I tried to put delay but this will increase the animation time. how to control the stream so if it's passed specific time it will complete the stream.
m

Matthieu Esnault

11/14/2019, 8:19 AM
If I understand correctly, you want a Completable.merge with - a Completable.timeout of your animation duration - your setup Completable
m

Mohamed Ibrahim

11/14/2019, 8:59 AM
I have to get a result in the observer
m

Matthieu Esnault

11/14/2019, 9:00 AM
Is it a Single then ? Why an Observable for a setup ?
With an Observable, a Observable.combineLatest with an Observable.timeout should be ok For a Single it would be a Single.zip with a Single.timeout
👍 1
3 Views