First revision of the new browser provider.
This one has support for bookmarks sync,
has the bookmarks and history in separate
tables, and supports hierarchical bookmarks.
Compatibility with the old APIs is not yet complete.
The Bookmarks UI has been switched over to the
new provider. Creating bookmarks puts them
in the UIs root folder.
Change-Id: Ib21713ddd19f43d178d49dbac977f749e7103368
diff --git a/res/layout/bookmarks.xml b/res/layout/bookmarks.xml
new file mode 100644
index 0000000..e3e4a9d
--- /dev/null
+++ b/res/layout/bookmarks.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+>
+
+ <LinearLayout android:id="@android:id/content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ >
+ <Button android:id="@+id/up"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/defaultBookmarksUpButton"
+ />
+
+ <GridView android:id="@+id/grid"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+
+ android:horizontalSpacing="8dip"
+ android:verticalSpacing="14dip"
+ android:stretchMode="spacingWidth"
+ android:scrollbarStyle="insideInset"
+ android:listSelector="@android:drawable/gallery_thumb"
+ android:drawSelectorOnTop="true"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ android:numColumns="auto_fit"
+ />
+ </LinearLayout>
+
+ <TextView android:id="@android:id/empty"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:text="@string/empty_history"
+ android:visibility="gone"
+ />
+
+</FrameLayout>
\ No newline at end of file
diff --git a/res/menu/bookmarks.xml b/res/menu/bookmarks.xml
deleted file mode 100644
index a8781c2..0000000
--- a/res/menu/bookmarks.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@+id/new_context_menu_id"
- android:icon="@drawable/ic_menu_add_bookmark"
- android:title="@string/bookmark_page" />
- <item android:id="@+id/switch_mode_menu_id"
- />
-</menu>
diff --git a/res/menu/bookmarkscontext.xml b/res/menu/bookmarkscontext.xml
index badbb00..c58d459 100644
--- a/res/menu/bookmarkscontext.xml
+++ b/res/menu/bookmarkscontext.xml
@@ -15,10 +15,6 @@
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <group android:id="@+id/ADD_MENU">
- <item android:id="@+id/new_context_menu_id"
- android:title="@string/save_to_bookmarks"/>
- </group>
<group android:id="@+id/CONTEXT_MENU">
<item android:id="@+id/open_context_menu_id"
android:title="@string/open_bookmark"/>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index af0bbe9..52db4e0 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -746,4 +746,7 @@
<string name="error_console_eval_text_hint" translatable="false">Evaluate JavaScript</string>
<string name="error_console_eval_button_text" translatable="false">Evaluate</string>
+ <!-- The default state to the "up to parent folder" button in the bookmarks UI. This
+ is displayed when the user is at the highest level and cannot go up -->
+ <string name="defaultBookmarksUpButton">Bookmarks</string>
</resources>