mirror of https://github.com/tasks/tasks
Use trash action for delete
parent
4712c781bc
commit
a86ba9d4e4
@ -1,94 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2012 Todoroo Inc
|
|
||||||
*
|
|
||||||
* See the file "LICENSE" for the full license governing this code.
|
|
||||||
*/
|
|
||||||
package com.todoroo.astrid.api;
|
|
||||||
|
|
||||||
import android.os.Parcel;
|
|
||||||
import android.os.Parcelable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents an add-onn for Astrid. Users can enable or disable add-ons,
|
|
||||||
* which affect all other extension points that share the same identifier.
|
|
||||||
*
|
|
||||||
* @author Tim Su <tim@todoroo.com>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class Addon implements Parcelable {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add-on Identifier
|
|
||||||
*/
|
|
||||||
public String addon = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Plug-in Title
|
|
||||||
*/
|
|
||||||
public String title = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Plug-in Author
|
|
||||||
*/
|
|
||||||
public String author = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Plug-in Description
|
|
||||||
*/
|
|
||||||
public String description = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convenience constructor to generate a plug-in object
|
|
||||||
*/
|
|
||||||
public Addon(String addon, String title, String author, String description) {
|
|
||||||
this.addon = addon;
|
|
||||||
this.title = title;
|
|
||||||
this.author = author;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- parcelable helpers
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int describeContents() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void writeToParcel(Parcel dest, int flags) {
|
|
||||||
dest.writeString(addon);
|
|
||||||
dest.writeString(title);
|
|
||||||
dest.writeString(author);
|
|
||||||
dest.writeString(description);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parcelable creator
|
|
||||||
*/
|
|
||||||
public static final Parcelable.Creator<Addon> CREATOR = new Parcelable.Creator<Addon>() {
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Addon createFromParcel(Parcel source) {
|
|
||||||
return new Addon(source.readString(), source.readString(),
|
|
||||||
source.readString(), source.readString());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Addon[] newArray(int size) {
|
|
||||||
return new Addon[size];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 161 B |
Binary file not shown.
|
After Width: | Height: | Size: 151 B |
Binary file not shown.
|
After Width: | Height: | Size: 194 B |
Binary file not shown.
|
After Width: | Height: | Size: 115 B |
@ -1,11 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tasks="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_save"
|
android:id="@+id/menu_save"
|
||||||
android:title="@string/save"
|
android:title="@string/save"
|
||||||
android:icon="?attr/ic_action_save"
|
android:icon="?attr/ic_action_save"
|
||||||
tasks:showAsAction="ifRoom"/>
|
app:showAsAction="always"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/delete"
|
||||||
|
android:title="@string/delete"
|
||||||
|
android:icon="?attr/ic_action_delete"
|
||||||
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
Loading…
Reference in New Issue