use of org.wikipedia.readinglist.ReadingListBookmarkMenu in project apps-android-wikipedia by wikimedia.
the class RandomFragment method onSaveShareClick.
@OnClick(R.id.random_save_button)
void onSaveShareClick() {
PageTitle title = getTopTitle();
if (title == null) {
return;
}
if (saveButtonState) {
new ReadingListBookmarkMenu(saveButton, new ReadingListBookmarkMenu.Callback() {
@Override
public void onAddRequest(@Nullable ReadingListPage page) {
onAddPageToList(title);
}
@Override
public void onDeleted(@Nullable ReadingListPage page) {
FeedbackUtil.showMessage(getActivity(), getString(R.string.reading_list_item_deleted, title.getDisplayText()));
updateSaveShareButton(title);
}
@Override
public void onShare() {
// ignore
}
}).show(title);
} else {
onAddPageToList(title);
}
}
Aggregations