Exemplo n.º 1
0
  @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));
  }
Exemplo n.º 2
0
 private ListView createTab(String tag, int id) {
   final TabHost host = getTabHost();
   final String label = myResource.getResource(tag).getValue();
   host.addTab(host.newTabSpec(tag).setIndicator(label).setContent(id));
   return (ListView) findViewById(id);
 }