ghahramani / viewpager

Google Play Music Tabs and View Pager
Apache License 2.0
47 stars 42 forks source link

Crash on 2.3.7 #3

Open farwayer opened 10 years ago

farwayer commented 10 years ago
[ERROR] :  AndroidRuntime: Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1
[ERROR] :  AndroidRuntime:   at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:463)
[ERROR] :  AndroidRuntime:   at com.astuetz.viewpager.extensions.PagerSlidingTabStrip.<init>(PagerSlidingTabStrip.java:162)
[ERROR] :  AndroidRuntime:   at com.astuetz.viewpager.extensions.PagerSlidingTabStrip.<init>(PagerSlidingTabStrip.java:115)
[ERROR] :  AndroidRuntime:   at com.astuetz.viewpager.extensions.PagerSlidingTabStrip.<init>(PagerSlidingTabStrip.java:111)
[ERROR] :  AndroidRuntime:   at com.navid.tabs.PagerTabsView.<init>(PagerTabsView.java:55)
[ERROR] :  AndroidRuntime:   at com.navid.tabs.PagerTabsView.<init>(PagerTabsView.java:86)
[ERROR] :  AndroidRuntime:   at com.navid.tabs.PagerTabsProxy.createView(PagerTabsProxy.java:40)

Test app from you version of PagerSlidingTabStrip work fine but not ti module.

farwayer commented 10 years ago

Sry, I have no time to understand what the problem is. But I can advise how to avoid this bug to someone. Fast and ugly hack: comment

scrollOffset = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_scrollOffset, scrollOffset);

in PagerSlidingTabStrip library, rebuild it and rebuild ti module with new library. After that scrollOffset will be defaults to 52.

By some coincidence R.styleable.PagerSlidingTabStrip_scrollOffset takes the TypedValue.TYPE_REFERENCE type on API 10 but getDimensionPixelSize understand only TypedValue.TYPE_DIMENTION.

kbshl commented 9 years ago

Thnx for the explanation of the quick bug fix. I can't get to rebuild the library. What steps should I do, to get the library as jar? Can you help me?

farwayer commented 9 years ago

Try this fork https://github.com/ricardoalcocer/viewpager

kbshl commented 9 years ago

Thanx for your answer! In my project I use this fork, but the bug is also given in this fork