Looks like the scope may have changed causing the DVP library to not work. See here and here for more details and work arounds.
Add the following class to your project(Make sure to have the package correctly otherwise this won't work):
package android.support.v4.view;
public final class PagerAdapterPublicCompat {
private PagerAdapterPublicCompat() {}
public interface DataSetObserver extends PagerAdapter.DataSetObserver {}
public static void setDataSetObserver(PagerAdapter adapter, DataSetObserver observer) {
adapter.setDataSetObserver(observer);
}
}
then you have to set your data observer:
// from the sample code:
final DirectionalViewPager pager = (DirectionalViewPager)findViewById(R.id.pager);
pager.setAdapter(new TestFragmentAdapter(getSupportFragmentManager()));
// new addition:
PagerAdapterPublicCompat.setDataSetObserver(pager.getAdapter(), YourDataSetObserver);