Skip to content

Instantly share code, notes, and snippets.

Christian Krillsson

View GitHub Profile
@Krillsson
Krillsson / PeriodicLiveData.java
Last active Sep 4, 2017
LiveData extension that omits periodic ticks
View PeriodicLiveData.java
package com.krillsson.android.example;
import android.arch.lifecycle.LiveData;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
public abstract class PeriodicLiveData<T> extends LiveData<T> {
private final int delay;
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.