/** * When a user selects an item: - If it's a directory, load that directory. - If it's a file, open * the SheetMusicActivity. */ @Override protected void onListItemClick(ListView parent, View view, int position, long id) { super.onListItemClick(parent, view, position, id); FileUri file = (FileUri) this.getListAdapter().getItem(position); if (file.isDirectory()) { this.loadDirectory(file.getUri().getPath()); return; } else { ChooseSongActivity.openFile(file); } }