mirror of https://github.com/tasks/tasks
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.4 KiB
Java
53 lines
1.4 KiB
Java
package org.tasks.filters;
|
|
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
import com.todoroo.astrid.api.FilterListItem;
|
|
|
|
public class NavigationDrawerSubheader extends FilterListItem {
|
|
|
|
public static final Parcelable.Creator<NavigationDrawerSubheader> CREATOR =
|
|
new Parcelable.Creator<NavigationDrawerSubheader>() {
|
|
|
|
/** {@inheritDoc} */
|
|
@Override
|
|
public NavigationDrawerSubheader createFromParcel(Parcel source) {
|
|
NavigationDrawerSubheader navigationDrawerSubheader = new NavigationDrawerSubheader();
|
|
navigationDrawerSubheader.readFromParcel(source);
|
|
return navigationDrawerSubheader;
|
|
}
|
|
|
|
/** {@inheritDoc} */
|
|
@Override
|
|
public NavigationDrawerSubheader[] newArray(int size) {
|
|
return new NavigationDrawerSubheader[size];
|
|
}
|
|
};
|
|
|
|
public boolean error;
|
|
|
|
private NavigationDrawerSubheader() {}
|
|
|
|
public NavigationDrawerSubheader(String listingTitle, boolean error) {
|
|
this.error = error;
|
|
this.listingTitle = listingTitle;
|
|
}
|
|
|
|
@Override
|
|
protected void readFromParcel(Parcel source) {
|
|
super.readFromParcel(source);
|
|
error = source.readInt() == 1;
|
|
}
|
|
|
|
@Override
|
|
public void writeToParcel(Parcel dest, int flags) {
|
|
super.writeToParcel(dest, flags);
|
|
dest.writeInt(error ? 1 : 0);
|
|
}
|
|
|
|
@Override
|
|
public Type getItemType() {
|
|
return Type.SUBHEADER;
|
|
}
|
|
}
|