@Override public void onNoteSelected(int pagePosition, int verseNumber) { Bundle bundle = new Bundle(); bundle.putInt(ReaderFragment.KEY_PAGE_POSITION, pagePosition); bundle.putInt(ReaderFragment.KEY_VERSE_NUMBER, verseNumber); EpubReader.getFlowInstanse().replace(new ReaderFragment(), bundle, false); }
public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.notes_fragment, null); notesRecyclerView = (RecyclerView) rootView.findViewById(R.id.list_notes_rv); notesRecyclerView.setHasFixedSize(true); notesRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); notesRecyclerView.addItemDecoration( new DividerItemDecoration(getResources().getDrawable(R.drawable.divider))); // notesRecyclerView.setItemAnimator(new FadeInLeftAnimator()); searchNoteEt = (EditText) rootView.findViewById(R.id.list_notes_search_et); EpubReader.getDrawerInstanse(EpubReader.getActivityIsntanse()).setSlidingEnabled(true); ((MainActivity) EpubReader.getActivityIsntanse()).visibleBookMark(false); ((MainActivity) EpubReader.getActivityIsntanse()).visibleReader(false); ((MainActivity) EpubReader.getActivityIsntanse()).visibleDelete(false); ((MainActivity) EpubReader.getActivityIsntanse()).visibleSearch(false); ((MainActivity) EpubReader.getActivityIsntanse()).visibleNightMode(false); // ((MainActivity) EpubReader.getActivityIsntanse()) // .setOnDeleteListner(this); ((MainActivity) EpubReader.getActivityIsntanse()).changeBookName("Notes"); /*((MainActivity) EpubReader.getActivityIsntanse()) .visiblechangeBookNumber(false);*/ noteCountTv = (TextView) rootView.findViewById(R.id.list_notes_count_tv); searchNoteEt.setOnFocusChangeListener(this); searchNoteEt.setFocusable(true); searchNoteEt.setFocusableInTouchMode(true); searchNoteEt.requestFocus(); searchNoteEt.setOnEditorActionListener( new OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { // setShedPrefrnceUserLogin(); return true; } return false; } }); return rootView; }