title: How to create LiveData which emits a single event and notifies only last subscribed observer?
body: <p>I created live data which emits a single event as in this <a href="https://github.com/googlesamples/android-architecture/blob/dev-todo-mvvm-live/todoapp/app/src/main/java/com/example/android/architecture/blueprints/todoapp/SingleLiveEvent.java" rel="noreferrer">example</a>.</p>
  
  <p>My question is next: 
  How to notify only last subscribed observer when the value in the LiveData changes?</p>
  
  <p>What comes to my mind is to store observers in the linked list in SingleLiveData class and then to call <code>super.observe</code> only if a passed observer is the same as the last element of the list. </p>
  
  <p>I'm not sure if this is the best approach. </p>
  
  <p>I want to use this mechanism to propagate FAB click events from activity to the fragments which are shown inside of the ViewPager. Fragments are dynamically added to view pager adapter, so let's say that we know the order of the fragments.</p>