/[projects]/android/MarketStats/src/dk/thoerup/marketstats/CommentCallback.java
ViewVC logotype

Annotation of /android/MarketStats/src/dk/thoerup/marketstats/CommentCallback.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 664 - (hide annotations) (download)
Fri Apr 23 15:25:52 2010 UTC (14 years, 1 month ago) by torben
File size: 1230 byte(s)
Outcommented debug statements
1 torben 662 package dk.thoerup.marketstats;
2    
3     import java.util.List;
4    
5     import com.gc.android.market.api.MarketSession.Callback;
6     import com.gc.android.market.api.model.Market.Comment;
7     import com.gc.android.market.api.model.Market.CommentsResponse;
8     import com.gc.android.market.api.model.Market.ResponseContext;
9    
10     public class CommentCallback implements Callback<CommentsResponse>{
11     private String locale;
12     private List<CommentBean> commentBeans;
13    
14 torben 663 private int entryCount;
15    
16 torben 662 public void setLocale(String loc) {
17     locale = loc;
18     }
19    
20     public void setList(List<CommentBean> cl) {
21     commentBeans = cl;
22     }
23    
24 torben 663 public int getEntryCount() {
25     return entryCount;
26     }
27 torben 662
28    
29     @Override
30     public void onResult(ResponseContext context, CommentsResponse response) {
31     //System.out.println("Response : " + response);
32     //sb.append("Response: " + response + "\n");
33 torben 663 entryCount = response.getEntriesCount();
34 torben 664
35     //System.out.println("Count="+entryCount);
36 torben 662
37     List<Comment> cl = response.getCommentsList();
38     for (Comment c : cl) {
39     CommentBean bean = new CommentBean();
40     bean.locale = locale;
41     bean.author = c.getAuthorName();
42     bean.rating = c.getRating();
43     bean.time = c.getCreationTime();
44     bean.text = c.getText();
45     commentBeans.add(bean);
46     }
47     }
48     }

  ViewVC Help
Powered by ViewVC 1.1.20