android - How to Handle Error inflating class? -



android - How to Handle Error inflating class? -

i added new progress bar lib project. added through maven. used progress bar in layout file. while running app shows error.

caused by: android.view.inflateexception: binary xml file line #15: error inflating class com.github.castorflex.android.circularprogressbar.circularprogressbar

this library using https://github.com/castorflex/smoothprogressbar.

my layout file

<framelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".mainactivity" tools:ignore="mergerootframe"> <listview android:id="@+id/feed_list" android:layout_width="match_parent" android:layout_height="match_parent" /> <com.github.castorflex.android.circularprogressbar.circularprogressbar xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:indeterminate="true" android:id="@+id/progressbar" app:cpb_color="#ffee44" app:cpb_colors="@array/colors" app:cpb_rotation_speed="1.0" app:cpb_sweep_speed="1.0" app:cpb_stroke_width="4dp" app:cpb_min_sweep_angle="10" app:cpb_max_sweep_angle="300" /> </framelayout>

my class

public class videoactivity extends activity { private static final string tag = "mine"; private static final int req_start_standalone_player = 1; private static final int req_resolve_service_missing = 2; public static final string developer_key = "aizasydcnoqjgi1872s"; public listview listview; private feedlistadapter listadapter; private list<feeditem> feeditems; public string mvideoid; public string mstatus; progressbar progressbar; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_feed_list); progressbar = (progressbar) findviewbyid(r.id.progressbar); progressbar.setvisibility(view.visible); listview = (listview) findviewbyid(r.id.feed_list); feeditems = new arraylist<feeditem>(); listadapter = new feedlistadapter(this, feeditems); listview.setadapter(listadapter); // making fresh volley request , getting json gsonrequest<feedresult> gsonrequest = new gsonrequest<feedresult>(url_feed, feedresult.class, new response.listener<feedresult>() { @override public void onresponse(feedresult response) { feeditems = response.getfeeditems(); listadapter.setdata(feeditems); listadapter.notifydatasetchanged(); progressbar.setvisibility(view.invisible); } }, new response.errorlistener() { @override public void onerrorresponse(volleyerror error) { log.d(tag, "error: " + error.getmessage()); } }); // adding request volley request queue appcontroller.getinstance().addrequest(gsonrequest, tag); getid(); } }

if using custom component refer same name i.e.

import com.github.castorflex.android.circularprogressbar.circularprogressbar; public class videoactivity extends activity { circularprogressbar progressbar; . . @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_feed_list); progressbar = (circularprogressbar) findviewbyid(r.id.progressbar); . . .

you using default 1 isn't nowadays in xml

android android-progressbar

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -