Created
December 7, 2018 12:35
-
-
Save jutikorn/33d47c398a9ab2d38ffffa14bc497e4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LiveData<String> source = ....; // | |
final MediatorLiveData<String> result = new MediatorLiveData<>(); | |
result.addSource(source, new Observer<String>() { | |
@Override | |
public void onChanged(@Nullable String x) { | |
// do something here | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment