Search in sources :

Example 1 with AgendaFragment

use of com.orgzly.android.ui.notes.query.agenda.AgendaFragment in project orgzly-android by orgzly.

the class DisplayManager method getDisplayedQuery.

public static String getDisplayedQuery(FragmentManager fragmentManager) {
    Fragment qf = fragmentManager.findFragmentByTag(SearchFragment.FRAGMENT_TAG);
    Fragment af = fragmentManager.findFragmentByTag(AgendaFragment.FRAGMENT_TAG);
    if (qf != null && qf.isVisible()) {
        return ((SearchFragment) qf).getCurrentQuery();
    } else if (af != null && af.isVisible()) {
        return ((AgendaFragment) af).getCurrentQuery();
    }
    return null;
}
Also used : SearchFragment(com.orgzly.android.ui.notes.query.search.SearchFragment) SavedSearchFragment(com.orgzly.android.ui.savedsearch.SavedSearchFragment) SearchFragment(com.orgzly.android.ui.notes.query.search.SearchFragment) AgendaFragment(com.orgzly.android.ui.notes.query.agenda.AgendaFragment) SavedSearchesFragment(com.orgzly.android.ui.savedsearches.SavedSearchesFragment) SavedSearchFragment(com.orgzly.android.ui.savedsearch.SavedSearchFragment) Fragment(androidx.fragment.app.Fragment) BookPrefaceFragment(com.orgzly.android.ui.notes.book.BookPrefaceFragment) BooksFragment(com.orgzly.android.ui.books.BooksFragment) NoteFragment(com.orgzly.android.ui.note.NoteFragment) BookFragment(com.orgzly.android.ui.notes.book.BookFragment)

Aggregations

Fragment (androidx.fragment.app.Fragment)1 BooksFragment (com.orgzly.android.ui.books.BooksFragment)1 NoteFragment (com.orgzly.android.ui.note.NoteFragment)1 BookFragment (com.orgzly.android.ui.notes.book.BookFragment)1 BookPrefaceFragment (com.orgzly.android.ui.notes.book.BookPrefaceFragment)1 AgendaFragment (com.orgzly.android.ui.notes.query.agenda.AgendaFragment)1 SearchFragment (com.orgzly.android.ui.notes.query.search.SearchFragment)1 SavedSearchFragment (com.orgzly.android.ui.savedsearch.SavedSearchFragment)1 SavedSearchesFragment (com.orgzly.android.ui.savedsearches.SavedSearchesFragment)1