summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2009-07-15 16:54:37 -0400
committerLeon Scroggins <scroggo@google.com>2009-07-15 17:03:18 -0400
commit89c6d36e2e6d6040540ee93ef4df29a6874a6a95 (patch)
tree2865c32137536e900c496fbd9ec25263978a2222 /res
parent650a7b8a8606e04244494fed324f5d4526849e33 (diff)
downloadpackages_apps_Browser-89c6d36e2e6d6040540ee93ef4df29a6874a6a95.zip
packages_apps_Browser-89c6d36e2e6d6040540ee93ef4df29a6874a6a95.tar.gz
packages_apps_Browser-89c6d36e2e6d6040540ee93ef4df29a6874a6a95.tar.bz2
Work on the Bookmark Grid, including the favicon.
Remove the file BookmarkGridPage, since a GridView will do just fine. Now we specify a height and width for the bitmaps rather than adjusting them for the screen size. Also add the favicon and match the design more closely for the Add option. In BrowserActivity, match the size of the saved screenshots to the desired size for the Bookmarks Activity. Also move the logic into its own method so it can be called from multiple places (still called in only one at the moment).
Diffstat (limited to 'res')
-rw-r--r--res/layout/bookmark_thumbnail.xml42
-rw-r--r--res/values/strings.xml3
2 files changed, 37 insertions, 8 deletions
diff --git a/res/layout/bookmark_thumbnail.xml b/res/layout/bookmark_thumbnail.xml
index 5e7a27b..2f8a09d 100644
--- a/res/layout/bookmark_thumbnail.xml
+++ b/res/layout/bookmark_thumbnail.xml
@@ -14,7 +14,7 @@
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="vertical"
android:padding="4dip"
@@ -23,21 +23,47 @@
<ImageView android:id="@+id/thumb"
android:src="@drawable/blank"
android:scaleType="center"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="100dip"
+ android:layout_height="80dip"
/>
-<!--
<ImageView android:id="@+id/fav"
android:scaleType="center"
android:layout_width="20dip"
android:layout_height="20dip"
+ android:layout_alignBottom="@+id/thumb"
+ android:background="@color/white"
/>
--->
-
- <TextView android:id="@+id/label"
+ <LinearLayout android:id="@+id/holder"
+ android:layout_height="wrap_content"
android:layout_width="fill_parent"
+ android:orientation="horizontal"
+ android:background="#cc000000"
+ android:gravity="center"
+ android:layout_alignBottom="@+id/thumb"
+ >
+ <ImageView
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_marginTop="3dip"
+ android:layout_marginBottom="3dip"
+ android:src="@drawable/ic_tab_browser_bookmark_selected"
+ />
+ <TextView
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="bold"
+ android:textColor="@color/white"
+ android:text="@string/add_bookmark_short"
+ />
+ </LinearLayout>
+ <!-- Keep the width in sync with BrowserBookmarksPage and
+ BrowserActivity.updateScreenshot -->
+ <TextView android:id="@+id/label"
+ android:layout_width="100dip"
android:layout_height="wrap_content"
+ android:layout_below="@+id/thumb"
android:layout_gravity="bottom"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold"
@@ -50,4 +76,4 @@
android:scrollHorizontally="true"
android:ellipsize="marquee"
/>
-</LinearLayout>
+</RelativeLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5f158a2..b8fa9cf 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -495,6 +495,9 @@
<string name="empty_history">Browser history is empty.</string>
<!-- Displayed at the top of the bookmarks page. When clicked, it bookmarks the page the browser is currently showing -->
<string name="add_new_bookmark">Add bookmark\u2026</string>
+ <!-- Verb placed in front of a screenshot of a web page that, when clicked,
+ will add that page to bookmarks -->
+ <string name="add_bookmark_short">Add</string>
<!-- Add bookmark dialog sets its title to this if we have no database.
This is an error case -->
<string name="no_database">No database!</string>