Try to implement this inside your onCreateView:
For Activity –
BaseActivity.imageLoader.init(ImageLoaderConfiguration.createDefault(getBaseContext()));
For Fragment –
ImageLoader.getInstance().init(ImageLoaderConfiguration.createDefault(getActivity()));
Related Contents:
- NullPointerException accessing views in onCreate()
- Using context in a fragment
- Android Activity ClassNotFoundException – tried everything
- Replacing a fragment with another fragment inside activity group
- Access ViewPager Fragment method from Activity
- Android search with Fragments
- Setting Custom ActionBar Title from Fragment
- onActivityResult() not called in new nested fragment API
- How to send data from DialogFragment to a Fragment?
- Why is accessing TextView of a Fragment inside Activity throwing an error
- How to get elements of fragments created by ViewPager in MainActivity?
- How to check permission in fragment
- Android FragmentManager BackStackRecord.run throwing NullPointerException
- When is onAttach called during the Fragment LifeCycle? [duplicate]
- RecyclerView not calling onCreateViewHolder or onBindView
- onRequestPermissionsResult not being called in dialog fragment
- Android – How to change fragments in the Navigation Drawer
- incompatible types: HomeFragment cannot be converted to Fragment in Android
- How to launch an Activity from another Application in Android
- How to paginate Firestore with Android?
- Inner class can access but not update values – AsyncTask
- Launching Google Maps Directions via an intent on Android
- java.text.ParseException: Unparseable date: java.text.DateFormat.parse(DateFormat.java:579)
- Custom fonts and XML layouts (Android)
- Paginating text in Android
- How to load a Java class dynamically on android/dalvik?
- How to add image in a TextView text?
- Is it possible to use VectorDrawable in Buttons and TextViews using android:DrawableRight?
- How to convert 24 hr format time in to 12 hr Format?
- How to remove all callbacks from a Handler?
- What is difference between @+id/android:list and @+id/list
- Android Firestore convert array of document references to List
- Android HttpPost: how to get the result
- Navigation drawer item icon not showing original colour
- How to call a RESTful web service from Android?
- android.app.Application cannot be cast to android.app.Activity
- How do you have the code pause for a couple of seconds in android?
- Can’t get OkHttp’s response.body.toString() to return a string
- How to change package name of an Android Application
- Is there any library or algorithm for Persian (Shamsi or Jalali) calendar in Android? [closed]
- Polygon Touch detection Google Map API V2
- Sending HTTP Post Request with Android
- Flutter.io Android License Status Unknown
- Android drawable speech bubble
- HttpURLConnection.getResponseCode() returns -1 on second invocation
- Why can’t I use Resources.getSystem() without a Runtime error?
- Android @Override usage [duplicate]
- Retrofit GSON serialize Date from json string into java.util.date
- Prevent class member name obfuscation by ProGuard
- Android Context.bindService always returns false and ServiceConnection object is never triggered