private void addBookmark() { final Bookmark bookmark = SerializerUtil.deserializeBookmark(getIntent().getStringExtra(FBReader.BOOKMARK_KEY)); if (bookmark != null) { myCollection.saveBookmark(bookmark); myThisBookAdapter.add(bookmark); myAllBooksAdapter.add(bookmark); } }
@Override protected void run(Object... params) { Intent intent = new Intent("android.fbreader.action.EXTERNAL_LIBRARY"); try { OrientationUtil.startActivity(BaseActivity, intent); } catch (ActivityNotFoundException e) { intent = new Intent(BaseActivity.getApplicationContext(), LibraryActivity.class); if (Reader.Model != null) { intent.putExtra(FBReader.BOOK_KEY, SerializerUtil.serialize(Reader.Model.Book)); } OrientationUtil.startActivity(BaseActivity, intent); } }
@Override public void onCreate(Bundle bundle) { super.onCreate(bundle); Thread.setDefaultUncaughtExceptionHandler( new org.geometerplus.zlibrary.ui.android.library.UncaughtExceptionHandler(this)); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); requestWindowFeature(Window.FEATURE_NO_TITLE); setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL); final SearchManager manager = (SearchManager) getSystemService(SEARCH_SERVICE); manager.setOnCancelListener(null); final TabHost host = getTabHost(); LayoutInflater.from(this).inflate(R.layout.bookmarks, host.getTabContentView(), true); myBook = SerializerUtil.deserializeBook(getIntent().getStringExtra(FBReader.BOOK_KEY)); }