@Override public void onCreate(Bundle icicle) { super.onCreate(icicle); myDatabase = SQLiteBooksDatabase.Instance(); if (myDatabase == null) { myDatabase = new SQLiteBooksDatabase(this, "LIBRARY"); } if (myLibrary == null) { myLibrary = Library.Instance(); myLibrary.addChangeListener(this); myLibrary.startBuild(); } final String selectedBookPath = getIntent().getStringExtra(SELECTED_BOOK_PATH_KEY); mySelectedBook = null; if (selectedBookPath != null) { final ZLFile file = ZLFile.createFileByPath(selectedBookPath); if (file != null) { mySelectedBook = Book.getByFile(file); } } new LibraryTreeAdapter(this); myActivity = this; init(getIntent()); // commenting out to prevent soft keyboard when using Eyes-Free keyboard // getListView().setTextFilterEnabled(true); getListView().setOnCreateContextMenuListener(this); dialog = new Dialog(this); dialog.setContentView(R.layout.accessible_long_press_dialog); list = (ListView) dialog.findViewById(R.id.accessible_list); }