Android Error inflating class SwipeRefreshLayout -


i working on app right uses 3 tabs fragment in each , trying implement swiperefreshlayout in each of these fragments. believe have created correctly, continue errors:

android.view.inflateexception: binary xml file line #1: error inflating class swiperefreshlayout caused by: java.lang.classnotfoundexception: didn't find class "android.view.swiperefreshlayout" on path: dexpathlist[[zip file "/data/app/com.ryan.brooks.fropllc.frop.app-1.apk"],nativelibrarydirectories=[/data/app-lib/com.ryan.brooks.fropllc.frop.app-1, /vendor/lib, /system/lib]]     @ com.ryan.brooks.fropllc.frop.app.whatsgoingonfragment.oncreateview(whatsgoingonfragment.java:23) 

now have absolutely no idea causing this. if me tremendously appreciated.

here fragment layout implementing swiperefreshlayout:

<swiperefreshlayout     android:layout_width="match_parent"     android:layout_height="match_parent"     android:id="@+id/swipe_refresh_whats_going_on">      <scrollview         android:layout_width="match_parent"         android:layout_height="match_parent"         android:background="#343434"></scrollview>  </swiperefreshlayout> 

and here fragment class calling swiperefreshlayout.

public class whatsgoingonfragment extends fragment {      private swiperefreshlayout swipelayout;      @override     public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) {         // inflate layout fragment         view view = inflater.inflate(r.layout.whats_going_on_fragment, container, false);          // retrieve swiperefreshlayout , listview instances         swipelayout = (swiperefreshlayout) view.findviewbyid(r.id.swipe_refresh_whats_going_on);          // set color scheme of swiperefreshlayout providing 4 color resource ids         swipelayout.setcolorscheme(                 android.r.color.holo_blue_bright,                 android.r.color.holo_green_light,                 android.r.color.holo_orange_light,                 android.r.color.holo_red_light);          return view;     } } 

both layouts , class structure exact same 3 fragments id name changes. have no clue going wrong here. again appreciated!

you need use full package name swiperefreshlayout:

<android.support.v4.widget.swiperefreshlayout     android:layout_width="match_parent"     android:layout_height="match_parent"     tools:context="com.ryan.brooks.fropllc.frop.app.whatsgoingonfragment"     android:id="@+id/swipe_refresh_whats_going_on">      <scrollview         android:layout_width="match_parent"         android:layout_height="match_parent"         android:background="#343434"></scrollview>  </android.support.v4.widget.swiperefreshlayout> 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -