8 |
import com.gc.android.market.api.model.Market.ResponseContext; |
import com.gc.android.market.api.model.Market.ResponseContext; |
9 |
|
|
10 |
public class CommentCallback implements Callback<CommentsResponse>{ |
public class CommentCallback implements Callback<CommentsResponse>{ |
|
private String locale; |
|
11 |
private List<CommentBean> commentBeans; |
private List<CommentBean> commentBeans; |
12 |
|
|
13 |
private int entryCount; |
private int entryCount; |
14 |
|
|
|
public void setLocale(String loc) { |
|
|
locale = loc; |
|
|
} |
|
|
|
|
15 |
public void setList(List<CommentBean> cl) { |
public void setList(List<CommentBean> cl) { |
16 |
commentBeans = cl; |
commentBeans = cl; |
17 |
} |
} |
26 |
//System.out.println("Response : " + response); |
//System.out.println("Response : " + response); |
27 |
//sb.append("Response: " + response + "\n"); |
//sb.append("Response: " + response + "\n"); |
28 |
entryCount = response.getEntriesCount(); |
entryCount = response.getEntriesCount(); |
29 |
System.out.println("Count="+entryCount); |
|
30 |
|
//System.out.println("Count="+entryCount); |
31 |
|
|
32 |
List<Comment> cl = response.getCommentsList(); |
List<Comment> cl = response.getCommentsList(); |
33 |
for (Comment c : cl) { |
for (Comment c : cl) { |
34 |
CommentBean bean = new CommentBean(); |
CommentBean bean = new CommentBean(); |
|
bean.locale = locale; |
|
35 |
bean.author = c.getAuthorName(); |
bean.author = c.getAuthorName(); |
36 |
bean.rating = c.getRating(); |
bean.rating = c.getRating(); |
37 |
bean.time = c.getCreationTime(); |
bean.time = c.getCreationTime(); |
38 |
bean.text = c.getText(); |
bean.text = c.getText(); |
39 |
commentBeans.add(bean); |
commentBeans.add(bean); |
40 |
} |
} |
41 |
|
|
42 |
} |
} |
43 |
} |
} |