Search in sources :

Example 1 with ReadingListsOverflowView

use of org.wikipedia.views.ReadingListsOverflowView in project apps-android-wikipedia by wikimedia.

the class ReadingListsFragment method onOptionsItemSelected.

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch(item.getItemId()) {
        case R.id.menu_search_lists:
            ((AppCompatActivity) requireActivity()).startSupportActionMode(searchActionModeCallback);
            return true;
        case R.id.menu_overflow_button:
            ReadingListsOverflowView overflowView = new ReadingListsOverflowView(requireContext());
            overflowView.show(((MainActivity) requireActivity()).getToolbar().findViewById(R.id.menu_overflow_button), overflowCallback);
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}
Also used : AppCompatActivity(android.support.v7.app.AppCompatActivity) ReadingListsOverflowView(org.wikipedia.views.ReadingListsOverflowView) MainActivity(org.wikipedia.main.MainActivity)

Aggregations

AppCompatActivity (android.support.v7.app.AppCompatActivity)1 MainActivity (org.wikipedia.main.MainActivity)1 ReadingListsOverflowView (org.wikipedia.views.ReadingListsOverflowView)1