Volley with Listiew

459 views.

Here i want to display list view and the items are in list those are loaded from server. Before starting this program just concentrate on Json (API).

URL: http://androindian.com/apps/blog_links/api.php

Req: {“action”:”get_all_links”}

Res Success : {“response”:”success”,”results”:2,”data”:[{“id”:”1″,”title”:”android-activity-life-cycle”,”url”:”http:\/\/rajandroindian.blogspot.in\/2015\/08\/android-activity-life-cycle.html”},{“id”:”2″,”title”:”android-interview-questions”,”url”:”http:\/\/rajandroindian.blogspot.in\/2015\/08\/android-interview-questions.html”}]}

Res empty : {“response”:”success”,”results”:0,”data”:[]}
Res Failed : {“response”:”failed”}

for Volley library we need one supported gradle that we need to add in gradle. This program am doing with data binding so extra need to add databinding.enabled=true like below in gradle.

activity_main.xml

MainActivity.java

androidmanifest.xml

Output

You may also like...

Leave a Reply