• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.xtremelabs.robolectric.shadows;
2 
3 import android.database.DataSetObserver;
4 import android.support.v4.view.PagerAdapter;
5 import com.xtremelabs.robolectric.internal.Implementation;
6 import com.xtremelabs.robolectric.internal.Implements;
7 
8 @Implements(PagerAdapter.class)
9 public class ShadowPagerAdapter {
10     private DataSetObserver dataSetObserver;
11 
12     @Implementation
registerDataSetObserver(DataSetObserver dataSetObserver)13     public void registerDataSetObserver(DataSetObserver dataSetObserver) {
14         this.dataSetObserver = dataSetObserver;
15     }
16 
17     @Implementation
notifyDataSetChanged()18     public void notifyDataSetChanged() {
19         if (dataSetObserver != null) {
20             dataSetObserver.onChanged();
21         }
22     }
23 }
24