Android Open Source - EasyNote Note Item






From Project

Back to project page EasyNote.

License

The source code is released under:

This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a co...

If you think the Android project EasyNote 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.manustudios.easynote;
/*www.j  a v  a  2  s  .c o  m*/
import android.annotation.SuppressLint;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class NoteItem {

  private String key;
  private String title;
  private String text;
  private String date;
  private boolean selfTitle;
  
  public String getKey() {
    return key;
  }
  public void setKey(String key) {
    this.key = key;
  }
  public String getText() {
    return text;
  }
  public void setText(String text) {
    this.text = text;
  }
  public String getDate() {
    return date;
  }
  public void setDate(String date) {
    this.date = date;
  }
  public boolean isSelfTitle() {
    return selfTitle;
  }
  public void setSelfTitle(boolean selfTitle) {
    this.selfTitle = selfTitle;
  }
  public String getTitle() {
    return title;
  }
  public void setTitle(String title) {
    this.title = title;
  }
  
  @SuppressLint("SimpleDateFormat")
  public static NoteItem getNew(){
    
    Locale locale = new Locale("en_US");
    Locale.setDefault(locale);
    
    String pattern = "yyyy-MM-dd HH:mm:ss Z";
    SimpleDateFormat formatter = new SimpleDateFormat(pattern);
    String key =formatter.format(new Date());
    
    NoteItem note = new NoteItem();
    note.setKey(key);
    note.setText("");
    return note;
  }
  
  @Override
  public String toString() {
    // TODO Auto-generated method stub
    return this.getText();
  }
  
  
  
}




Java Source Code List

com.manustudios.easynote.MainActivity.java
com.manustudios.easynote.NoteDataSource.java
com.manustudios.easynote.NoteEditorActivity.java
com.manustudios.easynote.NoteItemAdapter.java
com.manustudios.easynote.NoteItem.java