Click here to Skip to main content
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-jw11.1K
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)

  Print Answers RSS
0 OriginalGriff 215
1 George Jonsson 175
2 Kornfeld Eliyahu Peter 159
3 PIEBALDconsult 110
4 Richard MacCutchan 85
0 OriginalGriff 6,080
1 DamithSL 4,648
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,624
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 13 Jun 2013
Copyright © CodeProject, 1999-2014
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