Esempio n. 1
0
  @Override
  protected void onStart() {
    super.onStart();

    runOnUiThread(
        new Runnable() {
          public void run() {
            setProgressBarIndeterminateVisibility(true);
          }
        });

    myCollection.bindToService(
        this,
        new Runnable() {
          public void run() {
            if (myAllBooksAdapter != null) {
              return;
            }

            if (myBook != null) {
              myThisBookAdapter = new BookmarksAdapter(createTab("thisBook", R.id.this_book), true);
            } else {
              findViewById(R.id.this_book).setVisibility(View.GONE);
            }
            myAllBooksAdapter = new BookmarksAdapter(createTab("allBooks", R.id.all_books), false);
            findViewById(R.id.search_results).setVisibility(View.GONE);

            new Thread(new Initializer()).start();
          }
        });

    OrientationUtil.setOrientation(this, getIntent());
  }