tt-rss-android/src/org/fox/ttrss/types/FeedCategory.java

59 lines
1.2 KiB
Java
Raw Normal View History

2012-06-19 10:18:00 +00:00
package org.fox.ttrss.types;
2011-11-28 14:45:32 +00:00
import android.os.Parcel;
import android.os.Parcelable;
public class FeedCategory implements Parcelable {
2012-06-19 10:18:00 +00:00
public int id;
public String title;
public int unread;
public int order_id;
2011-11-28 14:45:32 +00:00
public FeedCategory(Parcel in) {
readFromParcel(in);
}
2011-11-29 05:25:13 +00:00
public FeedCategory(int id, String title, int unread) {
this.id = id;
this.title = title;
this.unread = unread;
this.order_id = 0;
2011-11-29 05:25:13 +00:00
}
2012-09-04 12:28:50 +00:00
public FeedCategory() {
}
2011-11-28 14:45:32 +00:00
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeInt(id);
out.writeString(title);
out.writeInt(unread);
out.writeInt(order_id);
2011-11-28 14:45:32 +00:00
}
public void readFromParcel(Parcel in) {
id = in.readInt();
title = in.readString();
unread = in.readInt();
order_id = in.readInt();
2011-11-28 14:45:32 +00:00
}
@SuppressWarnings("rawtypes")
public static final Parcelable.Creator CREATOR =
new Parcelable.Creator() {
public FeedCategory createFromParcel(Parcel in) {
return new FeedCategory(in);
}
public FeedCategory[] newArray(int size) {
return new FeedCategory[size];
}
};
}