Search in sources :

Example 1 with TagBookmarkDialog

use of com.quran.labs.androidquran.ui.fragment.TagBookmarkDialog in project quran_android by quran.

the class TagBookmarkPresenterTest method testAddDialogCall.

@Test
public void testAddDialogCall() {
    TagBookmarkDialog bookmarkDialog = mock(TagBookmarkDialog.class);
    TagBookmarkPresenter presenter = spy(new TagBookmarkPresenter(bookmarkModel));
    presenter.bind(bookmarkDialog);
    assertThat(presenter.toggleTag(-1)).isFalse();
    verify(bookmarkDialog, times(1)).showAddTagDialog();
    presenter.unbind(bookmarkDialog);
}
Also used : TagBookmarkDialog(com.quran.labs.androidquran.ui.fragment.TagBookmarkDialog) Test(org.junit.Test)

Example 2 with TagBookmarkDialog

use of com.quran.labs.androidquran.ui.fragment.TagBookmarkDialog in project quran_android by quran.

the class QuranActivity method tagBookmarks.

public void tagBookmarks(long[] ids) {
    if (ids != null && ids.length == 1) {
        tagBookmark(ids[0]);
        return;
    }
    if (!isPaused) {
        FragmentManager fm = getSupportFragmentManager();
        TagBookmarkDialog tagBookmarkDialog = TagBookmarkDialog.newInstance(ids);
        tagBookmarkDialog.show(fm, TagBookmarkDialog.TAG);
    }
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) TagBookmarkDialog(com.quran.labs.androidquran.ui.fragment.TagBookmarkDialog)

Example 3 with TagBookmarkDialog

use of com.quran.labs.androidquran.ui.fragment.TagBookmarkDialog in project quran_android by quran.

the class QuranActivity method tagBookmark.

private void tagBookmark(long id) {
    if (!isPaused) {
        FragmentManager fm = getSupportFragmentManager();
        TagBookmarkDialog tagBookmarkDialog = TagBookmarkDialog.newInstance(id);
        tagBookmarkDialog.show(fm, TagBookmarkDialog.TAG);
    }
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) TagBookmarkDialog(com.quran.labs.androidquran.ui.fragment.TagBookmarkDialog)

Aggregations

TagBookmarkDialog (com.quran.labs.androidquran.ui.fragment.TagBookmarkDialog)3 FragmentManager (android.support.v4.app.FragmentManager)2 Test (org.junit.Test)1