I'm very sorry for i explained like fool...
I mean I can't compile because of error.
public class PictureBean implements Serializable
{
public enum CCLtype implements Serializable
{
BY, ND, CO, NN, SA
}
private String picture_rm;
private String picture_url;
private String picture_16_9_url;
private String author;
private String title;
private String description;
private String p_memo;
private String p_original_rate;
private String move_url;
private int like_count;
private int picture_exp_count;
private List<JsonObject> tagList;
private List<JsonObject> categoryList;
private CCLtype ccl;
private String picture_source;
private boolean isUserLiked;
private boolean isUserAdded;
I use this PictureBean.class for contain image datas in my server.
but when I send list of PictureBean data to activity from activity, like below, Eclipse occurred error line.
How could I send list of PictureBean to activity from activity?
'mItems''s dataType is List of PictureBean.
intent.putExtra(CategoryDetailPagerActivity.EXTRA_DATA_CATEGORY_DETAIL_LIST, mItems);
Update:
Don't put the list it self as an extra. send a class object that contain the list as the only member as follow:
public class SerialObject implements Serializable
{
private static final long serialVersionUID = -3975620301776205681L;
public List<PictureBean> myItems;
}
SerialObject sb = new SerialObject();
sb.myItems = mItems;
intent.putExtra(CategoryDetailPagerActivity.EXTRA_DATA_CATEGORY_DETAIL_LIST, sb);
Original Answer:
This is how your class should be:
public class PictureBean implements Serializable
{
private static final long serialVersionUID = 6969933524911660214L;
public enum CCLtype
{
BY, ND, CO, NN, SA
}
private String picture_rm;
private String picture_url;
private String picture_16_9_url;
private String author;
private String title;
private String description;
private String p_memo;
private String p_original_rate;
private String move_url;
private int like_count;
private int picture_exp_count;
private List<JsonObject> tagList;
private List<JsonObject> categoryList;
private CCLtype ccl;
private String picture_source;
private boolean isUserLiked;
private boolean isUserAdded;
}
Same thing for the JsonObject class.
I believe that you don't have to serialise CCLtype
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments