Obsolete
Status Update
Comments
an...@gmail.com <an...@gmail.com> #2
PagerAdapter.DataSetObserver (ERROR : PagerAdapter.DataSetObserver cannot be resolved to a type )
th...@gmail.com <th...@gmail.com> #3
I'm working on getting DirectionalViewPager working w/the latest compatibility library.
The latest version of the compatibility library, 4.1.1, seems to replace the interface PagerAdapter.DataSetObserver with the abstract class android.database.DataSetObserver. Instead of onDataSetChanged(), you have onChanged() and onInvalidated().
The latest version of the compatibility library, 4.1.1, seems to replace the interface PagerAdapter.DataSetObserver with the abstract class android.database.DataSetObserver. Instead of onDataSetChanged(), you have onChanged() and onInvalidated().
nv...@gmail.com <nv...@gmail.com> #4
I am not able to get DirectionalViewPager working with the latest compatibility library, 4.1.1 because of this issue.
What changes need to be made to DirectionalViewPager.java to work with android.database.DataSetObserver?
What changes need to be made to DirectionalViewPager.java to work with android.database.DataSetObserver?
pr...@gmail.com <pr...@gmail.com> #5
PagerAdapter.DataSetObserver cannot be resolved to a type. I'm also getting this error.
mi...@gmail.com <mi...@gmail.com> #6
[Comment deleted]
mi...@gmail.com <mi...@gmail.com> #7
Experiencing the same issue :-( Why wouldn't you provide your own vertical pager ???
ki...@gmail.com <ki...@gmail.com> #8
Same issue here. A shame the VerticalViewpager doesn't work :/
ga...@gmail.com <ga...@gmail.com> #9
Same problem here
da...@gmail.com <da...@gmail.com> #10
I believe latest Android Support Library has fixed this issue. PageAdapter now uses public abstract class 'android.database.DataSetObserver', rather than private interface 'PageAdapter.DataSetObserver'. So, user is able to set their own 'DataSetObserver'.
The problem about 'DirectionalViewPager' and 'VerticalViewPager' is because, in 'DirectionalViewPager' library, the author use the above workaround, and there is no 'PageAdapter.DataSetObserver' anymore. This is a bug in 'DirectionalViewPager' library, not in 'AOSP'. User who got this error should report to its author, or fix it by their own. It should be quite easy to fix.
The problem about 'DirectionalViewPager' and 'VerticalViewPager' is because, in 'DirectionalViewPager' library, the author use the above workaround, and there is no 'PageAdapter.DataSetObserver' anymore. This is a bug in 'DirectionalViewPager' library, not in 'AOSP'. User who got this error should report to its author, or fix it by their own. It should be quite easy to fix.
mr...@googlemail.com <mr...@googlemail.com> #12
I had the exact same issue like you. With the help of one guy from stackoverflow I was able to fix and recompile the jar. Now it should be usable with the android-support-v4-r11 lib.
http://stackoverflow.com/questions/10720276/error-including-android-directionalviewpager-jar-in-eclipse/14268702#14268702
hope that helps.
hope that helps.
ja...@gmail.com <ja...@gmail.com> #13
`registerDataSetObserver` is package scoped so the fact that they're using a standard impl makes no difference. Should be public.
ja...@gmail.com <ja...@gmail.com> #14
This was fixed by fba5d14230cf87eb238050b4a1ebe457a85dc0b6 in AOSP. Presumably will be included in r13.
Description
As a workaround, I am currently using the following class
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);
}
}