Android Open Source - SimpleNotepad Note Viewer






From Project

Back to project page SimpleNotepad.

License

The source code is released under:

Copyright 2011 Patryk, Kwiatkowski. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:...

If you think the Android project SimpleNotepad 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.patrykkwiatkowski.simplenotepad;
// w  ww. j a  va2  s.  c  om
import java.text.SimpleDateFormat;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class NoteViewer extends Activity {
  private TextView contentTextView;
  private TextView dateTextView;
  private TextView timeTextView;

  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.viewnote);

    Bundle request = this.getIntent().getExtras();
    Note note = (Note) request.get("note");

    contentTextView = (TextView) findViewById(R.id.viewNoteContentTextView);
    dateTextView = (TextView) findViewById(R.id.viewNoteDateTextView);
    timeTextView = (TextView) findViewById(R.id.viewNoteTimeTextView);

    contentTextView.setText(note.getTextContent());
    dateTextView.setText(new SimpleDateFormat("yyyy-MM-dd").format(note.getCreationDate()));
    timeTextView.setText(new SimpleDateFormat("kk:mm:ss").format(note.getCreationDate()));
  }
}




Java Source Code List

com.patrykkwiatkowski.simplenotepad.NoteEditor.java
com.patrykkwiatkowski.simplenotepad.NoteListViewAdapter.java
com.patrykkwiatkowski.simplenotepad.NoteList.java
com.patrykkwiatkowski.simplenotepad.NoteStorage.java
com.patrykkwiatkowski.simplenotepad.NoteViewer.java
com.patrykkwiatkowski.simplenotepad.Note.java