Android Open Source - personal-diary Diary App






From Project

Back to project page personal-diary.

License

The source code is released under:

GNU Lesser General Public License

If you think the Android project personal-diary 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.rahul.pDiary;
/*  w  w w . j  av  a2 s .com*/
import android.app.Application;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.util.Log;

public class DiaryApp extends Application {
  static final String TAG = "DiaryApp";
  static String absolutePicPath = "null";
  static SharedPreferences prefs;

  @Override
  public void onCreate() {
    super.onCreate();
    Log.d(TAG, "onCreate");
    prefs = PreferenceManager.getDefaultSharedPreferences(this);
  }

  String checkForPasswords() {
    String pwd = prefs.getString("pref_password", "null");
    String sAns = prefs.getString("security_answer", "null");
    String toast = "Please go to Settings and set your ";

    if (pwd.equals("") && sAns.equals(""))
      toast += "password and security question";
    else if (pwd.equals(""))
      toast += "password";
    else if (sAns.equals(""))
      toast += "security question";
    return toast;
  }
  
  static boolean isThemeDark() {
    String theme = prefs.getString("theme", "dark");
    if(theme.equals("dark")) return true;
    return false;
  }
}




Java Source Code List

com.rahul.pDiary.DbHandler.java
com.rahul.pDiary.DiaryApp.java
com.rahul.pDiary.EditActivity.java
com.rahul.pDiary.GoProActivity.java
com.rahul.pDiary.ImageAdapter.java
com.rahul.pDiary.MenuActivity.java
com.rahul.pDiary.MyCard.java
com.rahul.pDiary.NoteCardActivity.java
com.rahul.pDiary.NoteListActivity.java
com.rahul.pDiary.PasswordActivity.java
com.rahul.pDiary.PrefsActivity.java
com.rahul.pDiary.TypeActivity.java
com.rahul.pDiary.ViewActivity.java