Search in sources :

Example 1 with SearchFragment

use of com.orgzly.android.ui.fragments.SearchFragment 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).getQuery();
    } else if (af != null && af.isVisible()) {
        return ((AgendaFragment) af).getQuery();
    }
    return null;
}
Also used : SearchFragment(com.orgzly.android.ui.fragments.SearchFragment) SearchFragment(com.orgzly.android.ui.fragments.SearchFragment) FilterFragment(com.orgzly.android.ui.fragments.FilterFragment) Fragment(android.support.v4.app.Fragment) AgendaFragment(com.orgzly.android.ui.fragments.AgendaFragment) NoteFragment(com.orgzly.android.ui.fragments.NoteFragment) BookFragment(com.orgzly.android.ui.fragments.BookFragment) BookPrefaceFragment(com.orgzly.android.ui.fragments.BookPrefaceFragment) BooksFragment(com.orgzly.android.ui.fragments.BooksFragment) FiltersFragment(com.orgzly.android.ui.fragments.FiltersFragment)

Aggregations

Fragment (android.support.v4.app.Fragment)1 AgendaFragment (com.orgzly.android.ui.fragments.AgendaFragment)1 BookFragment (com.orgzly.android.ui.fragments.BookFragment)1 BookPrefaceFragment (com.orgzly.android.ui.fragments.BookPrefaceFragment)1 BooksFragment (com.orgzly.android.ui.fragments.BooksFragment)1 FilterFragment (com.orgzly.android.ui.fragments.FilterFragment)1 FiltersFragment (com.orgzly.android.ui.fragments.FiltersFragment)1 NoteFragment (com.orgzly.android.ui.fragments.NoteFragment)1 SearchFragment (com.orgzly.android.ui.fragments.SearchFragment)1