Android Open Source - SimpleNotes Notes Utils






From Project

Back to project page SimpleNotes.

License

The source code is released under:

Apache License

If you think the Android project SimpleNotes 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.moysa.simplenotes.core;
//from ww w  . j  a v a 2s.c  om
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Created by Sergey Moysa on 15.03.14.
 */
public class NotesUtils {

    public static void sortNotes(List<Note> notes, boolean byName, boolean asc) {
        Collections.sort(notes, new NotesComparator(byName, asc));
    }

    public static List<Note> searchForText(String text, List<Note> notes) {

        ArrayList<Note> result = new ArrayList<Note>();

        for (Note note : notes) {
            if (note.getMessage().contains(text) || note.getName().contains(text))
                result.add(note);
        }

        return result;
    }
}




Java Source Code List

com.moysa.simplenotes.core.Note.java
com.moysa.simplenotes.core.NotesComparator.java
com.moysa.simplenotes.core.NotesUtils.java
com.moysa.simplenotes.db.NoteDataBaseHelper.java
com.moysa.simplenotes.ui.activities.MainActivity.java
com.moysa.simplenotes.ui.activities.SettingsActivity.java
com.moysa.simplenotes.ui.adapters.NotesAdapter.java
com.moysa.simplenotes.ui.application.NoteApplication.java
com.moysa.simplenotes.ui.fragments.NavigationDrawerFragment.java
com.moysa.simplenotes.ui.fragments.NoteFragment.java
com.moysa.simplenotes.ui.listeners.ListHeaderAnimationListener.java