Adds context menu for folders (edit/delete)
Bug: 3214901
Adds support for folder context menus to edit and delete folders.
Change-Id: I89cb2fa4b139ba3f59ec62b34154d5837c7f471b
diff --git a/res/layout/browser_add_bookmark.xml b/res/layout/browser_add_bookmark.xml
index 58b7a6b..0eaf526 100644
--- a/res/layout/browser_add_bookmark.xml
+++ b/res/layout/browser_add_bookmark.xml
@@ -93,7 +93,8 @@
android:textAppearance="?android:attr/textAppearanceMedium" />
</TableRow>
- <TableRow>
+ <TableRow
+ android:id="@+id/row_address">
<TextView
android:id="@+id/addressText"
android:layout_height="wrap_content"
diff --git a/res/menu/bookmarkscontext.xml b/res/menu/bookmarkscontext.xml
index c58d459..4d7ec7a 100644
--- a/res/menu/bookmarkscontext.xml
+++ b/res/menu/bookmarkscontext.xml
@@ -15,7 +15,8 @@
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <group android:id="@+id/CONTEXT_MENU">
+ <group android:id="@+id/BOOKMARK_CONTEXT_MENU"
+ android:visible="false">
<item android:id="@+id/open_context_menu_id"
android:title="@string/open_bookmark"/>
<item android:id="@+id/new_window_context_menu_id"
@@ -33,4 +34,11 @@
<item android:id="@+id/homepage_context_menu_id"
android:title="@string/set_as_homepage"/>
</group>
+ <group android:id="@+id/FOLDER_CONTEXT_MENU"
+ android:visible="false">
+ <item android:id="@+id/edit_context_menu_id"
+ android:title="@string/edit_folder"/>
+ <item android:id="@+id/delete_context_menu_id"
+ android:title="@string/delete_folder"/>
+ </group>
</menu>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 7d27dec..e98d9d5 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -131,6 +131,10 @@
<!-- Default name for a new folder and label for a button that allows the user to create a new folder
in the add bookmark dialog -->
<string name="new_folder">New folder</string>
+ <!-- Context menu item to edit a folder [CHAR LIMIT=50] -->
+ <string name="edit_folder">Edit folder</string>
+ <!-- Context menu item to delete a folder [CHAR LIMIT=50] -->
+ <string name="delete_folder">Delete folder</string>
<!-- Label stating that the currently open folder has no subfolders
in the add bookmark dialog [CHAR-LIMIT=none]-->
<string name="no_subfolders">No subfolders</string>
@@ -230,6 +234,10 @@
<string name="webarchive_saved">Web archive saved.</string>
<!-- Toast informing the user that saving the page has failed. -->
<string name="webarchive_failed">Failed to save web archive.</string>
+ <!-- The number of bookmarks in a folder [CHAR LIMT=50] -->
+ <string name="contextheader_folder_bookmarkcount"><xliff:g id="bookmark_count">%d</xliff:g> bookmarks</string>
+ <!-- No bookmarks in the folder [CHAR LIMIT=50] -->
+ <string name="contextheader_folder_empty">Empty folder</string>
<!-- Context Menu item open the currently selected link in the current
window.-->
<string name="contextmenu_openlink">Open</string>