예제 #1
0
파일: AtyMain.java 프로젝트: Kimxu/Vck
  @Override
  public void onEventMainThread(AddNote2Main event) {
    FragMain fragMain = adapter.getItem(mPosition);
    FragMainAdapter fmad = fragMain.getAdapter();
    LinearLayoutManager llmng = fragMain.getLinearLayoutManager();
    if (!event.isEdit()) {

      fmad.insert(event.getNote(), 0);
      llmng.scrollToPosition(0);

    } else {
      int editPosition = fragMain.getEditPosition();
      Note editNote = event.getNote();
      fmad.setItem(editNote, editPosition);
      llmng.scrollToPosition(editPosition);
    }
  }
예제 #2
0
파일: AtyMain.java 프로젝트: Kimxu/Vck
 private void initFrag() {
   fragMains[0] = FragMain.newInstance(0);
   fragMains[1] = FragMain.newInstance(1);
 }