mirror of https://github.com/tasks/tasks
Made searching work, fixed up goodies
parent
fc25791878
commit
329f371020
Binary file not shown.
After Width: | Height: | Size: 615 B |
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:label="@string/FLA_search_label"
|
||||
android:label="@string/app_name"
|
||||
android:hint="@string/FLA_search_hint">
|
||||
</searchable>
|
||||
|
||||
|
@ -0,0 +1,83 @@
|
||||
package com.todoroo.astrid.api;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* Special filter that triggers the search functionality when accessed.
|
||||
*
|
||||
* @author Tim Su <tim@todoroo.com>
|
||||
*
|
||||
*/
|
||||
public class SearchFilter extends FilterListItem {
|
||||
|
||||
/**
|
||||
* Plug-in Identifier
|
||||
*/
|
||||
public final String plugin;
|
||||
|
||||
/**
|
||||
* Constructor for creating a new SearchFilter
|
||||
*
|
||||
* @param plugin
|
||||
* {@link Plugin} identifier that encompasses object
|
||||
* @param listingTitle
|
||||
* Title of this item as displayed on the lists page, e.g. Inbox
|
||||
*/
|
||||
public SearchFilter(String plugin, String listingTitle) {
|
||||
this.plugin = plugin;
|
||||
this.listingTitle = listingTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for creating a new SearchFilter
|
||||
*
|
||||
* @param plugin
|
||||
* {@link Plugin} identifier that encompasses object
|
||||
*/
|
||||
protected SearchFilter(String plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
// --- parcelable
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(plugin);
|
||||
super.writeToParcel(dest, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parcelable creator
|
||||
*/
|
||||
public static final Parcelable.Creator<SearchFilter> CREATOR = new Parcelable.Creator<SearchFilter>() {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public SearchFilter createFromParcel(Parcel source) {
|
||||
SearchFilter item = new SearchFilter(source.readString());
|
||||
item.readFromParcel(source);
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public SearchFilter[] newArray(int size) {
|
||||
return new SearchFilter[size];
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue