Click here to Skip to main content
11,438,226 members (57,944 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Android
Hi All,

currently i created a webservice that returning a string in json format. so i want to call this string to my android application and want to display in gridview.how to dot it?plz help me.

this is my output of webservice

<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="EmployeeDetails">[{"FirstName":"Allen","LastName":"Mclleum","Age":"32","Designation":"Software Enginner","State":"Washigton"},{"FirstName":"Joe","LastName":"Josh","Age":"19","Designation":"Junior Programmer","State":"Kerala"},{"FirstName":"Vikas","LastName":"Rai","Age":"27","Designation":"Designer","State":"Delhi"},{"FirstName":"Silpa","LastName":"Sharma","Age":"27","Designation":"HR","State":"Mumbai"}]</string>

I have the JsonArray with values. i want to display that values in gridview. for that how to set header and display proper values under header
Posted 4-Jun-13 21:09pm
josh-jw12.7K
Edited 10-Jun-13 0:48am
v4
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It may not be appropriate to display everything within a grid on a phone device.
The screen size would be too small to show a grid.

However, here[^] is an example of using a grid view in an android device.
  Permalink  
Comments
josh-jw at 10-Jun-13 5:48am
   
I have the JsonArray with values. i want to display that values in gridview. for that how to set header and display proper values under header
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I displayed the response from webservice in listview usiing adapter.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.150506.1 | Last Updated 13 Jun 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100