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-jw10.8K
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 304
1 Maciej Los 285
2 Sergey Alexandrovich Kryukov 255
3 Shweta N Mishra 216
4 PIEBALDconsult 174
0 OriginalGriff 7,660
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,760


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.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