1-Overview :
In this tutorial you will learn how to parse a hosted json file and display the content to recyclerview
using Volley and Glide libraries :
Volley library : Volley is an HTTP library that makes networking for Android apps easier and most importantly, faster.
Glide : Glide is a fast and efficient open source media management and image loading framework for Android that wraps media decoding, memory and disk caching, and resource pooling into a simple and easy to use interface.
1.1- Final Result (Demo) :
1.2- Our Layout :
1.3- Our JSON File:
its simply a file contains an array of JSON Objects and our object structor is like the following :
Note : we are hosting our Json File on Github you can check this link for full file content
json link : https://goo.gl/oX5Ztp
json link : https://goo.gl/oX5Ztp
add the following packages in your project :
3 Create a Model Class :
3-1 Design Anime Item Row :
3-2 Design Activity main
3-3 ActivityMain.java
3-4 RecyclerView Adapter class
if you have any question please let me know in the comments section Thanks For reading my blog post
thank you so much bro..
RépondreSupprimercan you help me? i need to show in the recycleview depends on user id..
hello MUHAMMAD ILHAM,
Supprimeryou can send your user id to the recyclerview activity, depands on that id you must get a listitem related to that user then setup your adapter ...
Sir,I am waiting your new post on it
RépondreSupprimerplease wait my friend
Supprimeri cant post any new tutorial in this moment my laptop is broken..
Hi, great tutorial, for dummies where is the location of these files?
RépondreSupprimer3 Create a Model Class :
3-1 Design Anime Item Row :
3-2 Design Activity main
3-3 ActivityMain.java
3-4 RecyclerView Adapter class
Thank you
https://goo.gl/oX5Ztp
Supprimerhello Guys,sry for that i will updated the post soon..
Supprimermodel class is a POJO class create it inside Model package
anime item row and activity main inside the layout folder
activity main java inside the Activities Package
recyclerviewadapter inside Adapter package
hello how to add glide in my android studio
RépondreSupprimersimply add these dependency in build.gradle
Supprimer// Glide library
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
Hello,i have a problem when i use my API on this code i got this error "of type org.json.JSONObject cannot be converted to JSONArray",I try to google but i didnt found write solution.What shoud i change in this code,so it could work?
RépondreSupprimercan you show your main activity code
SupprimerGreat app....please provide the source code of part 2 of it
RépondreSupprimeri will add the second tutorial once i fix my laptop
Supprimerplease wait my friend
Hello sir ! I have a problem. I have a black page when launching. I checked two times my code. Can you help me ?
RépondreSupprimerplease provide your activity main code and your logcat
Supprimeralso did you add the internet permission inside the manifest file
acually i forgot to add the permission so sorry for that add this line inside your manifest file
Supprimer...
Supprimer...
Supprimercan you implementation interstitial ads on reycylerlistener
RépondreSupprimer