コード例 #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
    }
    mSnackbarManager = new SnackbarManager(getWindow());
    mBookmarkManager = new EnhancedBookmarkManager(this);
    setContentView(mBookmarkManager.getView());
    EnhancedBookmarkUtils.setTaskDescriptionInDocumentMode(this, getString(R.string.bookmarks));

    // Hack to work around inferred theme false lint error: http://crbug.com/445633
    assert (R.layout.eb_main_content != 0);
  }
コード例 #2
0
 @Override
 public void onBackPressed() {
   if (!mBookmarkManager.onBackPressed()) super.onBackPressed();
 }
コード例 #3
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
   mBookmarkManager.destroy();
   mSnackbarManager.dismissSnackbar(false);
 }