Esempio n. 1
0
 void showSearchResultsTab(LinkedList<Bookmark> results) {
   if (mySearchResultsView == null) {
     mySearchResultsView = createTab("searchResults", R.id.search_results);
     new BookmarksAdapter(mySearchResultsView, mySearchResults, false);
   } else {
     mySearchResults.clear();
   }
   mySearchResults.addAll(results);
   mySearchResultsView.invalidateViews();
   mySearchResultsView.requestLayout();
   getTabHost().setCurrentTabByTag("searchResults");
 }
Esempio n. 2
0
  @Override
  public void onStart() {
    super.onStart();
    final ZLAndroidApplication application = (ZLAndroidApplication) getApplication();

    final int fullScreenFlag =
        application.ShowStatusBarOption.getValue() ? 0 : WindowManager.LayoutParams.FLAG_FULLSCREEN;
    if (fullScreenFlag != myFullScreenFlag) {
      finish();
      startActivity(new Intent(this, getClass()));
    }

    final FBReaderApp fbReader = (FBReaderApp) FBReaderApp.Instance();
    final RelativeLayout root = (RelativeLayout) findViewById(R.id.root_view);
    ((PopupPanel) fbReader.getPopupById(TextSearchPopup.ID))
        .createControlPanel(this, root, PopupWindow.Location.Bottom);
    ((PopupPanel) fbReader.getPopupById(NavigationPopup.ID))
        .createControlPanel(this, root, PopupWindow.Location.Bottom);
    ((PopupPanel) fbReader.getPopupById(SelectionPopup.ID))
        .createControlPanel(this, root, PopupWindow.Location.Floating);

    synchronized (myPluginActions) {
      int index = 0;
      while (index < myPluginActions.size()) {
        fbReader.removeAction(PLUGIN_ACTION_PREFIX + index++);
      }
      myPluginActions.clear();
    }

    sendOrderedBroadcast(
        new Intent(PluginApi.ACTION_REGISTER),
        null,
        myPluginInfoReceiver,
        null,
        RESULT_OK,
        null,
        null);
  }