android - onPageScrolled method returns null after changing to lastest Support-v4 library -



android - onPageScrolled method returns null after changing to lastest Support-v4 library -

i have unusual problem here, have dialog fragment , method within :

@override public void onpagescrolled(int position, float positionoffset, int positionoffsetpixels) { currentposition = position; currentpositionoffset = positionoffset; scrolltochild(position, (int) (positionoffset * tabscontainer.getchildat(position).getwidth())); invalidate(); if (delegatepagelistener != null) { delegatepagelistener.onpagescrolled(position, positionoffset, positionoffsetpixels); } }

when utilize older version of support-v4.jar works fine, when utilize latest version of it, method:

scrolltochild(position, (int) (positionoffset * tabscontainer.getchildat(position).getwidth()));

returns error:

06-19 11:56:23.764: e/androidruntime(1024): java.lang.nullpointerexception 06-19 11:56:23.764: e/androidruntime(1024): @ com.astuetz.pagerslidingtabstrip$pagelistener.onpagescrolled (pagerslidingtabstrip.java:361) 06-19 11:56:23.764: e/androidruntime(1024): @ android.support.v4.view.viewpager.onpagescrolled(viewpager.java:1712) 06-19 11:56:23.764: e/androidruntime(1024): @ android.support.v4.view.viewpager.pagescrolled(viewpager.java:1633) 06-19 11:56:23.764: e/androidruntime(1024): @ android.support.v4.view.viewpager.scrolltoitem(viewpager.java:581) 06-19 11:56:23.764: e/androidruntime(1024): @ android.support.v4.view.viewpager.onlayout(viewpager.java:1600)

do understand wrong?

this might helpul.

https://github.com/astuetz/pagerslidingtabstrip/issues/69

i came same problem, after little testing, confirmed reason there no items show within pagerslidingtabstrip.

if you're sure have info should displayed, on pagerslidingtabstrip, maybe you've forgotten phone call pagerslidingtabstrip.notifydatasetchanged();

hope helps you!

android

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -