Android Open Source - inotes Note






From Project

Back to project page inotes.

License

The source code is released under:

GNU General Public License

If you think the Android project inotes listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.codeminders.inotes.model;
// ww w.  j a va2 s  . c  om
import android.os.Parcel;
import android.os.Parcelable;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class Note implements Parcelable {
    private int id = -1;
    private boolean newNote = false;
    private Date date;
    private String title;
    private String note;
    private String account;
    private Map<String, String> headers = new HashMap<String, String>();

    public Note() {
    }

    public Note(Parcel in) {
        id = in.readInt();
        newNote = in.readInt() == 1;
        date = new Date(in.readLong());
        title = in.readString();
        note = in.readString();
        account = in.readString();
        int count = in.readInt();
        for (int i = 0; i < count; i++) {
            headers.put(in.readString(), in.readString());
        }
    }

    public void writeToParcel(Parcel out, int flags) {
        out.writeInt(id);
        out.writeInt(newNote?1:0);
        out.writeLong(date.getTime());
        out.writeString(title);
        out.writeString(note);
        out.writeString(account);
        out.writeInt(headers.size());
        for (String key: headers.keySet()) {
            out.writeString(key);
            out.writeString(headers.get(key));
        }
    }

    public static final Parcelable.Creator<Note> CREATOR = new Parcelable.Creator<Note>() {
        public Note createFromParcel(Parcel in) {
            return new Note(in);
        }

        public Note[] newArray(int size) {
            return new Note[size];
        }
    };

    public int describeContents() {
        return 0;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public boolean isNewNote() {
        return newNote;
    }

    public void setNewNote(boolean newNote) {
        this.newNote = newNote;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public Map<String, String> getHeaders() {
        return headers;
    }

    public void setHeaders(Map<String, String> headers) {
        this.headers = headers;
    }

    public void addHeader(String key, String value) {
        headers.put(key, value);
    }

    public String getHeader(String key) {
        return headers.get(key);
    }

}




Java Source Code List

com.codeminders.inotes.AccountReceiver.java
com.codeminders.inotes.Constants.java
com.codeminders.inotes.Utils.java
com.codeminders.inotes.auth.AuthenticationService.java
com.codeminders.inotes.auth.AuthenticatorActivity.java
com.codeminders.inotes.auth.Authenticator.java
com.codeminders.inotes.auth.ConfigurationActivity.java
com.codeminders.inotes.db.DBCreator.java
com.codeminders.inotes.db.DBManager.java
com.codeminders.inotes.db.DBUpgradeHelper.java
com.codeminders.inotes.imap.HeaderUtils.java
com.codeminders.inotes.imap.ImapService.java
com.codeminders.inotes.imap.ImapSession.java
com.codeminders.inotes.model.AccountInfo.java
com.codeminders.inotes.model.Note.java
com.codeminders.inotes.sync.NotesProvider.java
com.codeminders.inotes.sync.NotesSyncService.java
com.codeminders.inotes.sync.SyncAccountInfo.java
com.codeminders.inotes.sync.SyncAdapter.java
com.codeminders.inotes.sync.SyncAllAccountsInfo.java
com.codeminders.inotes.sync.SyncHelper.java
com.codeminders.inotes.sync.SyncInfo.java
com.codeminders.inotes.ui.AccountsListActivity.java
com.codeminders.inotes.ui.LinedEditText.java
com.codeminders.inotes.ui.NoteEditorActivity.java
com.codeminders.inotes.ui.NotesListActivity.java
com.codeminders.inotes.ui.SettingsActivity.java