@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_overview); ArrayList<String> demoArray = new ArrayList<String>(); demoArray.add("/file1"); demoArray.add("/18.06/file2"); demoArray.add("/18.06/file3"); demoArray.add("/18.100c/file4"); demoArray.add("/18.100c/file5"); demoArray.add("/18.100c/day1/file8"); demoArray.add("/18.100c/day2/file9"); demoArray.add("/18.100c/day2/hour5/file10"); demoArray.add("/file6"); FragmentManager fragmentManager = getSupportFragmentManager(); FragmentTransaction fragOp = fragmentManager.beginTransaction(); fragOp .replace(R.id.container, FileSystemFragment.newInstance(new Folder(null, "/", demoArray))) .commit(); /*================================= = New Stuff = =================================*/ cvExecutor = new VisionExecutor(); notes = new ArrayList<Note>(); // noteList.setOnItemClickListener(new AdapterView.OnItemClickListener() { // @Override // public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // Note selectedNote = (Note)noteList.getItemAtPosition(position); // // if(selectedNote.isReady()) { // Intent intent = new Intent(OverviewActivity.this, NoteViewActivity.class); // // Bundle b = new Bundle(); // b.putParcelable("image_path", selectedNote.getProcessed()); // intent.putExtras(b); // // startActivity(intent); // finish(); // } else { // Toast failureMessage = new Toast(context); // failureMessage.setDuration(Toast.LENGTH_SHORT); // failureMessage.setText("Processing not completed"); // failureMessage.show(); // } // } // // }); // /*----- End of New Stuff ------*/ }
@Override public void fileSystemInteraction(Items next) { FragmentManager fragmentManager = getSupportFragmentManager(); if (next.isFile()) { // TODO: handle file System.out.println(next.toString()); launchView(next.toString()); } else { fragmentManager .beginTransaction() .replace(R.id.container, FileSystemFragment.newInstance((Folder) next)) .commit(); } }