android - UnsupportedOperationException on EdgeEffect -
my app fails when initializing viewpager inflated xml. following line crashes android src edgecompat.java
final typedarray = context.obtainstyledattributes(com.android.internal.r.styleable.edgeeffect); final int themecolor = a.getcolor(com.android.internal.r.styleable.edgeeffect_coloredgeeffect, 0xff666666);
this called viewpager.initviewpager()
, can see in stack trace there error when inflating layout.
i have attached layout , stack trace below
layout
<merge xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/transparent" android:clickable="true" > <android.support.v4.view.viewpager android:id="@+id/pager" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/transparent" android:overscrollmode="never" /> <linearlayout android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:background="@android:color/black" /> </merge>
stacktrace
caused java.lang.unsupportedoperationexception android.content.res.typedarray.getcolor (typedarray.java:404) android.widget.edgeeffect. (edgeeffect.java:121) android.support.v4.widget.edgeeffectcompatics.newedgeeffect (edgeeffectcompatics.java:30) android.support.v4.widget.edgeeffectcompat$edgeeffecticsimpl.newedgeeffect (edgeeffectcompat.java:92) android.support.v4.widget.edgeeffectcompat. (edgeeffectcompat.java:133) android.support.v4.view.viewpager.initviewpager (viewpager.java:370) android.support.v4.view.viewpager. (viewpager.java:355) java.lang.reflect.constructor.newinstance (constructor.java) java.lang.reflect.constructor.newinstance (constructor.java:288) android.view.layoutinflater.createview (layoutinflater.java:607) android.view.layoutinflater.createviewfromtag (layoutinflater.java:743) android.view.layoutinflater.rinflate (layoutinflater.java:806) android.view.layoutinflater.inflate (layoutinflater.java:479) android.view.layoutinflater.inflate (layoutinflater.java:414)
Comments
Post a Comment