After watching the Google IO talk I've started playing with the API on
Android. The goal was to write a simple spreadsheet "library" to sit
between google-api-java-client and the android application.
I started with adding support for finding and opening a Spreadsheet
list feed by name, and extracting the row data, but got stuck on the
last step:
First I've successfully managed to build model classes for the
Spreadsheet feed (which list all the users spreadsheets), and the
Worksheet feed (which lists all worksheets in a spreadsheet).
But then as I said I got stuck on the last step: building the model
class for the List feed (which contains the content of each
spreadsheet row). There is an example of what the XML looks like for
the list feed here:
http://code.google.com/apis/spreadsheets/data/3.0/developers_guide.html#ListFeeds
Basically my question is: How do I access the actual cell content and
names(the tags in the gsx namespace) using the @Key notation ?
(of course I cant put static fields in the model because the amount of
columns and columnnames vary from spreadsheet to spreadsheet)
This is how my model classes currently look, except the cells field,
which I've lots of different approaches for, but I just cant get it to
work. (everything else works, i can successfully get the row "id" for
example)
public static class ListFeed {
@Key("entry") public List<String> entries;
}
public static class ListEntry {
@Key public String id;
@Key("gsx:*") public Map<String, String> cells; // just to
illustrate what i want
}
Is there anyway to get something like this to work?
Thanks
Joel Edström