android - In PagerSlidingTabStrip for xamarin InflateException -


i'm using pagerslidingtabstrip-for-xamarin.android material pager sliding tab strip xamarin.android lib

i import pagerslidingtabstrip lib solution (using vs2013) , added xml com.refractored.pagerslidingtabstrip

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:orientation="vertical"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:minwidth="25px"     android:minheight="25px">     <com.refractored.pagerslidingtabstrip         android:id="@+id/tabs"         android:layout_width="match_parent"         android:layout_height="?attr/actionbarsize"         android:background="?attr/colorprimary"         app:pstspaddingmiddle="true"         app:pstsdividerwidth="1dp"         app:pstsdividerpadding="12dp"         app:pstsdividercolor="#50ffffff" /> <!--change true if want center items-->     <android.support.v4.view.viewpager         android:id="@+id/pager"         android:layout_width="match_parent"         android:layout_height="0dp"         android:layout_weight="1"         tools:context=".mainactivity" /> </linearlayout> 

but inflateexception in setcontentview "com.refractored.pagerslidingtabstrip"

05-15 14:26:59.848 d/mono    (27464): dllimport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so'). 05-15 14:26:59.848 d/mono    (27464): searching '__android_log_print'. 05-15 14:26:59.848 d/mono    (27464): probing '__android_log_print'. 05-15 14:26:59.848 d/mono    (27464): found '__android_log_print'. 05-15 14:26:59.863 i/monodroid(27464): unhandled exception: 05-15 14:26:59.878 i/monodroid(27464): android.views.inflateexception: exception of type 'android.views.inflateexception' thrown. 05-15 14:26:59.878 i/monodroid(27464): @ system.runtime.exceptionservices.exceptiondispatchinfo.throw () <il 0x00011, 0x00068> 05-15 14:26:59.878 i/monodroid(27464): @ android.runtime.jnienv.callnonvirtualvoidmethod (intptr,intptr,intptr,android.runtime.jvalue[]) [0x00084] in /users/builder/data/lanes/1353/86274adf/source/monodroid/src/mono.android/src/runtime/jnienv.g.cs:896 05-15 14:26:59.878 i/monodroid(27464): @ android.app.activity.setcontentview (int) [0x00070] in /users/builder/data/lanes/1353/86274adf/source/monodroid/src/mono.android/platforms/android-21/src/generated/android.app.activity.cs:4763 05-15 14:26:59.878 i/monodroid(27464): @ android.app.activity.n_oncreate_landroid_os_bundle_ (intptr,intptr,intptr) [0x00011] in /users/builder/data/lanes/1353/86274adf/source/monodroid/src/mono.android/platforms/android-21/src/generated/android.app.activity.cs:2380 05-15 14:26:59.878 i/monodroid(27464): @ (wrapper dynamic-method) object.fc7251ee-439d-41fd-9acb-83d045358433 (intptr,intptr,intptr) <il 0x00017, 0x00043> 05-15 14:26:59.878 i/monodroid(27464):   --- end of managed exception stack trace --- 05-15 14:26:59.878 i/monodroid(27464): android.view.inflateexception: binary xml file line #1: error inflating class com.refractored.pagerslidingtabstrip 05-15 14:26:59.878 i/monodroid(27464):  @ android.view.layoutinflater.createview(layoutinflater.java:613) 05-15 14:26:59.878 i/monodroid(27464):  @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:687) 05-15 14:26:59.878 i/monodroid(27464):  @ android.view.layoutinflater.rinflate(layoutinflater.java:746) 05-15 14:26:59.878 i/monodroid(27464):  @ dalvik.system.na05-15 14:26:59.878 i/monodroid(27464):   @ android.view.layoutinflater.inflate(layoutinflater.java:489) 05-15 14:26:59.878 i/monodroid(27464):  @ android.view.layoutinflater.inflate(layoutinflater.java:396) 05-15 14:26:59.878 i/monodroid(27464):  @ android.view.layoutinflater.inflate(layoutinflater.java:352) 05-15 14:26:59.878 i/monodroid(27464):  @ com.android.internal.policy.impl.phonewindow.setcontentview(phonewindow.java:308) 05-15 14:26:59.878 i/monodroid(27464):  @ android.app.activity.setcontentview(activity.java:1924) 05-15 14:26:59.878 i/monodroid(27464):  @ scrollmenu.mainactivity.n_oncreate(native method) 05-15 14:26:59.878 i/monodroid(27464):  @ scrollmenu.mainactivity.oncreate(mainactivity.java:28) 05-15 14:26:59.878 i/monodroid(27464):  @ android.app.activity.performcreate(activity.java:5206) 05-15 14:26:59.878 i/monodroid(27464):  @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1094) 05-15 14:26:59.878 i/monodroid(27464):  @ android.app.activitythread.performlaunchactivity(activitythread.java:2074) 05-15 14:26:59.878 i/monodroid(27464):  @ android.app.activitythread.handlelaunchactivity(activitythread.java:2135) 05-15 14:26:59.878 i/monodroid(27464):  @ android.app.activitythread.access$700(activitythread.java:140) 05-15 14:26:59.878 i/monodroid(27464):  @ android.app.activitythread$h.handlemessage(activitythread.java:1237) 05-15 14:26:59.878 i/monodroid(27464):  @ android.os.handler.dispatchmessage(handler.java:99) 05-15 14:26:59.878 i/monodroid(27464):  @ android.os.looper.loop(looper.java:137) 05-15 14:26:59.878 i/monodroid(27464):  @ android.app.activitythread.main(activitythread.java:4946) 05-15 14:26:59.878 i/monodroid(27464):  @ java.lang.reflect.method.invokenative(native method) 05-15 14:26:59.878 i/monodroid(27464):  @ java.lang.reflect.method.invoke(method.java:511) 05-15 14:26:59.878 i/monodroid(27464):  @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1036) 05-15 14:26:59.878 i/monodroid(27464):  @ com.android.internal.os.zygoteinit.main(zygoteinit.java:803) 05-15 14:26:59.878 i/monodroid(27464):  @ dalvik.system.nativestart.main(native method) 05-15 14:26:59.878 i/monodroid(27464): caused by: java.lang.reflect.invocationtargetexception 05-15 14:26:59.878 i/monodroid(27464):  @ java.lang.reflect.constructor.constructnative(native method) 05-15 14:26:59.878 i/monodroid(27464):  @ java.lang.reflect.constructor.newinstance(constructor.java:417) 05-15 14:26:59.878 i/monodroid(27464):  @ android.view.layoutinflater.createview(layoutinflater.java:587) 05-15 14:26:59.878 i/monodroid(27464):  ... 23 more 05-15 14:26:59.878 i/monodroid(27464): caused by: android.content.res.resources$notfoundexception: resource not drawable (color or path): typedvalue{t=0x2/d=0x7f01009c a=-1} 05-15 14:26:59.878 i/monodroid(27464):  @ android.content.res.resources.loaddrawable(resources.java:2001) 05-15 14:26:59.878 i/monodroid(27464):  @ android.content.res.typedarray.getdrawable(typedarray.java:601) 05-15 14:26:59.878 i/monodroid(27464):  @ android.view.view.<init>(view.java:3444) 05-15 14:26:59.878 i/monodroid(27464):  @ android.view.viewgroup.<init>(viewgroup.java:432) 05-15 14:26:59.878 i/monodroid(27464):  @ android.widget.framelayout.<init>(framelayout.java:101) 05-15 14:26:59.878 i/monodroid(27464):  @ android.widget.horizontalscrollview.<init>(horizontalscrollview.java:202) 05-15 14:26:59.878 i/monodroid(27464):  @ android.widget.horizontalscrollview.<init>(horizontalscrollview.java:198) 05-15 14:26:59.878 i/monodroid(27464):  @ com.refractored.pagerslidingtabstrip.<init>(pagerslidingtabstrip.java:38) 05-15 14:26:59.878 i/monodroid(27464):  ... 26 more unhandled exception occured.  05-15 14:27:01.188 e/mono    (27464):  05-15 14:27:01.188 e/mono    (27464): unhandled exception: 05-15 14:27:01.188 e/mono    (27464): android.views.inflateexception: exception of type 'android.views.inflateexception' thrown. 05-15 14:27:01.188 e/mono    (27464): @ system.runtime.exceptionservices.exceptiondispatchinfo.throw () <il 0x00011, 0x00068> 05-15 14:27:01.188 e/mono    (27464): @ android.runtime.jnienv.callnonvirtualvoidmethod (intptr,intptr,intptr,android.runtime.jvalue[]) [0x00084] in /users/builder/data/lanes/1353/86274adf/source/monodroid/src/mono.android/src/runtime/jnienv.g.cs:896 05-15 14:27:01.188 e/mono    (27464): @ android.app.activity.setcontentview (int) [0x00070] in /users/builder/data/lanes/1353/86274adf/source/monodroid/src/mono.android/platforms/android-21/src/generated/android.app.activity.cs:4763 05-15 14:27:01.188 e/mono    (27464): @ scrollmenu.mainactivity.oncreate (android.os.bundle) [0x00009] in d:\j.vso\bbalde\android\scrollmenu\scrollmenu\mainactivity.cs:22 05-15 14:27:01.188 e/mono    (27464): @ android.app.activity.n_oncreate_landroid_os_bundle_ (intptr,intptr,intptr) [0x00011] in /users/builder/data/lanes/1353/86274adf/source/monodroid/src/mono.android/platforms/android-21/src/generated/android.app.activity.cs:2380 05-15 14:27:01.188 e/mono    (27464): @ (wrapper dynamic-method) object.fc7251ee-439d-41fd-9acb-83d045358433 (intptr,intptr,intptr) <il 0x00017, 0x00043> 05-15 14:27:01.188 e/mono    (27464):  05-15 14:27:01.188 e/mono    (27464):   --- end of managed exception stack trace --- 05-15 14:27:01.188 e/mono    (27464): android.view.inflateexception: binary xml file line #1: error inflating class com.refractored.pagerslidingtabstrip 05-15 14:27:01.188 e/mono    (27464):   @ android.view.layoutinflater.createview(layoutinflater.java:613) 05-15 14:27:01.188 e/mono    (27464):   @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:687) 05-15 14:27:01.188 e/mono    (27464):   @ android.view.layoutinflater.rinflate(layoutinflater.java:746) 05-15 14:27:01.188 e/mono    (27464):   @ android.view.layoutinflater.inflate(layoutinflater.java:489) 05-15 14:27:01.188 e/mono    (27464):   @ android.view.layoutinflater.inflate(layoutinflater.java:396) 05-15 14:27:01.188 e/mono    (27464):   @ android.view.layoutinflater.inflate(layoutinflater.java:352) 05-15 14:27:01.188 e/mono    (27464):   @ com.android.internal.policy.impl.phonewindow.setcontentview(phonewindow.java:308) 05-15 14:27:01.188 e/mono    (27464):   @ android.app.activity.setcontentview(activity.java:1924) 05-15 14:27:01.188 e/mono    (27464):   @ scrollmenu.mainactivity.n_oncreate(native method) 05-15 14:27:01.188 e/mono    (27464):   @ scrollmenu.mainactivity.oncreate(mainactivity.java:28) 05-15 14:27:01.188 e/mono    (27464):   @ android.app.activity.performcreate(activity.java:5206) 05-15 14:27:01.188 e/mono    (27464):   @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1094) 

the activity can call methods on library
did not connect library..?

if use mvvmcross framework must register pagerslidingtabstrip assembly on setup class:

public class setup : mvxandroidsetup {     protected override ilist<assembly> androidviewassemblies {         {             var assemlies = base.androidviewassemblies;             assemlies.add(typeof(viewpager).assembly);             assemlies.add(typeof(pagerslidingtabstrip).assembly);             return assemlies;         }     } } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -