- // Show the edit folder bookmark dialog.
- editBookmarkFolderDialog.show(getSupportFragmentManager(), getString(R.string.edit_folder));
+ // Open each bookmark
+ for (int i = 0; i < bookmarksCursor.getCount(); i++) {
+ // Load the bookmark in a new tab, moving to the tab for the first bookmark (i == 0).
+ addNewTab(bookmarksCursor.getString(bookmarksCursor.getColumnIndexOrThrow(BookmarksDatabaseHelper.BOOKMARK_URL)), (i == 0));
+
+ // Move to the next bookmark.
+ bookmarksCursor.moveToNext();
+ }
+
+ // Close the cursor.
+ bookmarksCursor.close();
+
+ // Close the bookmarks drawer.
+ drawerLayout.closeDrawer(GravityCompat.END);