Android Open Source - notepad Notepad Application






From Project

Back to project page notepad.

License

The source code is released under:

MIT License

If you think the Android project notepad 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.mick88.notepad;
//  w w  w.j  a v  a2s . co  m
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;

import com.mick88.notepad.notes.NoteManager;

public class NotepadApplication extends Application
{
  NoteManager noteManager = null;
  
  public NotepadApplication() {
  }
  
  @Override
  public void onCreate()
  {
    this.noteManager = new NoteManager(getApplicationContext());
    super.onCreate();
  }

  public NoteManager getNoteManager()
  {
    return noteManager;
  }
  
  public void openLink(String url)
  {
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setData(Uri.parse(url));
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(intent);
  }
  
  @SuppressWarnings("deprecation")
  public CharSequence getClipboardString()
  {
    android.text.ClipboardManager manager = (android.text.ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
    CharSequence string = manager.getText();
    if (TextUtils.isEmpty(string)) return null;
    return string;
  }
  
  @SuppressWarnings("deprecation")
  public void setClipboardString(CharSequence string)
  {
    android.text.ClipboardManager manager = (android.text.ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
    manager.setText(string);
  }
}




Java Source Code List

com.mick88.notepad.ConfirmationDialogFragment.java
com.mick88.notepad.NotepadApplication.java
com.mick88.notepad.note_edit.NoteEditActivity.java
com.mick88.notepad.note_list.LinkListDialog.java
com.mick88.notepad.note_list.NotepadListActivity.java
com.mick88.notepad.notes.NoteManager.java
com.mick88.notepad.notes.Note.java